Date: Mon, 14 Feb 2011 11:08:31 +0100 From: Rainer Hurling <rhurlin@gwdg.de> To: Murray Stokely <murray@stokely.org> Cc: David Schultz <das@FreeBSD.ORG>, freebsd-standards@freebsd.org Subject: Re: Support for C99 complex type required Message-ID: <4D58FF1F.8070207@gwdg.de> In-Reply-To: <AANLkTimP1T9-hm-JiAoRQ=R_4=GRMqnNYxNccecuR%2B-c@mail.gmail.com> References: <4D4EF746.9070502@gwdg.de> <20110207200839.GA82306@zim.MIT.EDU> <AANLkTimP1T9-hm-JiAoRQ=R_4=GRMqnNYxNccecuR%2B-c@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Am 14.02.2011 10:18 (UTC+1) schrieb Murray Stokely: > On Mon, Feb 7, 2011 at 12:08 PM, David Schultz<das@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D58FF1F.8070207>