Support for C99 complex type required
Murray Stokely
murray at stokely.org
Mon Feb 14 09:48:30 UTC 2011
On Mon, Feb 7, 2011 at 12:08 PM, David Schultz <das at 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
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
More information about the freebsd-standards
mailing list