numeric fdlibm
Ian Lance Taylor
ianaairs.com
Thu Aug 1 16:38:34 PDT 2002
"David G Hough at validlab.com" <validlabavalidlab.com> writes:
> A couple of years ago Stephen Moshier wrote:
>
> It is well known that fdlibm as originally posted was riddled with
> pointer aliasing bugs and other portability problems. You can get the
> benefit of other people's debugging efforts by looking at the Cygnus,
> DJGPP, linux glibc, or perhaps BSD versions. The Cygnus one is at
> ftp://sourceware.cygnus.com/pub/newlib/
> DJGPP is
> http://www.delorie.com
> Both of these mentioned come with very permissive license boilerplate.
>
> Is this still the current status? I'm looking for a version of fdlibm
> that preserves the original numerical algorithms but
> compiles correctly with full optimization on a variety of platforms
> with current versions of GCC (e.g. 3.1.1). The original libfdm problem
> with optimizers -
> finding an efficient way to access doubles as pairs of 32-bit ints -
> has been said to be insoluble since the C standard doesn't GUARANTEE any
> of the usual ways of doing so by pointers or unions. Even if that be
> true, I'd be happy for a version that works anyway at least on SPARC.
I did a bunch of work on eliminating this non-standard C usage from
fdlibm back in 1994 or so. I also added single precision versions of
the routines, but I didn't change the double precision routines. This
work can be found at
http://sources.redhat.com/newlib
in the newlib/libm/math directory. (sources.redhat.com is the
successor to sourceware.cygnus.com). I don't know how much the code
may have been changed in the past couple of years, though.
Ian
More information about the Numeric-interest
mailing list