Bug in SQRT function
Toon Moene
toon@moene.indiv.nluug.nl
Fri Feb 20 05:20:00 GMT 1998
> Using Fortran I experience a bug on a Linux Alpha machine.
>
> SQRT of 2.2250738585072014e-308 yields
>
> -3.408874917313431e-154 ^!!!!!!
>
> Using the DSHEVX function of LAPACK requires the use of
> SQRT(SQRT(SAFMIN)) which gives a SIGFPE, because of the
> negative intermediate result!
The Alpha's - until the 21264 - have no sqrt instruction. This
means that the compiler is generating a call to the (C-)library
function sqrt. It's that one that's probably in error - what's the
version number of the C-library on your system ?
Cheers,
Toon.
More information about the Gcc-bugs
mailing list