From owner-freebsd-standards@FreeBSD.ORG Mon Feb 14 10:08:43 2011 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4604B106564A; Mon, 14 Feb 2011 10:08:43 +0000 (UTC) (envelope-from rhurlin@gwdg.de) Received: from amailer.gwdg.de (amailer.gwdg.de [134.76.10.18]) by mx1.freebsd.org (Postfix) with ESMTP id CA2D18FC0C; Mon, 14 Feb 2011 10:08:42 +0000 (UTC) Received: from wald.nfv.gwdg.de ([134.76.242.31] helo=pc028.nfv) by mailer.gwdg.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1PovMG-0005Fe-9x; Mon, 14 Feb 2011 11:08:40 +0100 Message-ID: <4D58FF1F.8070207@gwdg.de> Date: Mon, 14 Feb 2011 11:08:31 +0100 From: Rainer Hurling User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; de-DE; rv:1.9.2.13) Gecko/20101221 Thunderbird/3.1.7 MIME-Version: 1.0 To: Murray Stokely References: <4D4EF746.9070502@gwdg.de> <20110207200839.GA82306@zim.MIT.EDU> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated: Id:rhurlin X-Spam-Level: - X-Virus-Scanned: (clean) by exiscan+sophie Cc: David Schultz , freebsd-standards@freebsd.org Subject: Re: Support for C99 complex type required X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Feb 2011 10:08:43 -0000 Am 14.02.2011 10:18 (UTC+1) schrieb Murray Stokely: > On Mon, Feb 7, 2011 at 12:08 PM, David Schultz wrote: >> The 'complex' type and rudimentary operations on complex numbers >> are supported, but the math library is missing all of the >> transcendental functions on complex numbers. There is some >> ongoing work in the area, but due to time constraints, it will >> likely be a while before we have complete support. In the mean >> time, you can see /usr/include/complex.h for a list of supported >> functions. I recall someone mentioning that there is a port that >> provides most of the missing functionality. > > Hi David, > > Is there any reason we can't pull in these missing libm routines from > NetBSD? They seem to have pulled in code from netlib and gotten > permission to relicense it under the BSD license. E.g. here is one of > the functions our FreeBSD 9 libm still lacks AFAICT: > > http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libm/complex/cexp.c?only_with_tag=MAIN > Brian Ripley explained at r-devel@r-project.org (02/07/2011), that there are some problems with code taken from NetBSD and put into Cygwin: "Cygwin has recently[*] added support for C99 complex math, taken from NetBSD with code that is very similar to that from Steven Moshier available via http://www.moshier.net/c9x_readme.html. That code isn't entirely right, especially not at the cuts on the inverse functions where C99 mandates what cut is used (and neither glibc nor Mac OS X have it correct). [*] AFAICS not yet released in Cygwin, but in newlib 1.19.0." > Also, Darwin seems to have picked up much of there C99 math support > from NetBSD as well, although it appears they've added more under an > APSL license and they provide assembly language code for Intel, Arm, > and PowerPC : > > http://www.opensource.apple.com/source/Libm/Libm-315/Source/Intel/ > http://www.opensource.apple.com/source/Libm/Libm-315/Source/complex.h > > Pulling in the APSL code may be a bit more controversial (though I > think warranted), but pulling in code from NetBSD seems like a no > brainer given that this standard is over a decade old and modern > software like Mplayer, R, etc depend on the newer C99 functions. > > Does the ongoing work in this area you describe involve porting the > NetBSD code or are you talking about another implementation? > > - Murray