Microsoft C miscompiles FDLIBM's "hypot"

Stephen L Moshier moshieramediaone.net
Sun Nov 12 14:12:42 PST 2000


> Unfortunately, the fdlibm hypot function uses a potentially
> ambiguous construction involving aliased pointers to specify bit
> operations on floating point numbers.

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.





More information about the Numeric-interest mailing list