Mail Archives: djgpp/1994/09/19/15:22:24
The discussion a few weeks back about the limitations of the DJGPP
math library inspired me to "port" the fdlibm-derived libm I maintain
for NetBSD and FreeBSD.
Here are some of the details:
1. It is derived from SunPro's fdlibm 5.1, with many bug fixes and
enhancements from NetBSD. It is complete, all of the functions
you expect to be there are there. I've heard that fdlibm was
the basis for the Solaris math library.
2. Float versions of all the functions have been contributed by
Ian Taylor of Cygnus Support. These functions (sinf, cosf,
etc.) take float arguments, return float results, and do all
calculations with float variables.
3. Many primitive operations done by bit manipulation rather than
computation for better accuracy and performance.
4. The library can be configured to comply (either at run time or
compile time) to ANSI/POSIX, XPG3, SVID, or IEEE 754 standards.
I have configured the library to be default to ANSI.
5. The library is organized so that it is extremely easy to "drop
in" assembly language versions of functions. I have already
done this for the NetBSD version, and will port them to djgpp
next weekend. More on that later.
6. The library's licence allows you to link it into a comercial
product without restrictions. I noticed that at least one of
the existing libm sources was under the GPL.
The library is available via anonymous ftp from ftp.cygnus.com in
~/pub/jtc/djgpp.
The file cdefs.h.patch is a patch to include\sys\cdefs.h. It fixes
the __P macro so it omits the prototype when compiling with gcc's
-traditional flag. And it adds the __BEGIN_DECLS and __END_DECLS
macros used by *BSD.
The file libm000.zip is the library. Unzip it in libsrc and make. It
installs itself as libnewm. You may want to copy this lib's math.h
over djgpp's, but that may not be necessary.
Call this version 0.00 since I haven't brought over the assembly
language stuff from NetBSD and haven't provided any README files. I
should be able to finish those things next weekend and release a new
version early next week.
Let me know how you like it.
--jtc
--
J.T. Conklin
Cygnus Support
- Raw text -