diff options
author | Andreas Jaeger <aj@suse.de> | 2003-12-28 18:57:35 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2003-12-28 18:57:35 +0000 |
commit | 3737a0d70cac3ba09aa8f32709c4be8d70f41207 (patch) | |
tree | 59b4bff748ed586c59475201ba0662f6efd1f30e | |
parent | 6b6557e8b3b094132c619e3a2e00fe28422fd16f (diff) | |
download | glibc-3737a0d70cac3ba09aa8f32709c4be8d70f41207.zip glibc-3737a0d70cac3ba09aa8f32709c4be8d70f41207.tar.gz glibc-3737a0d70cac3ba09aa8f32709c4be8d70f41207.tar.bz2 |
Do not raise execptions for exp(NaN).
-rw-r--r-- | sysdeps/ieee754/dbl-64/e_exp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_exp.c b/sysdeps/ieee754/dbl-64/e_exp.c index a6463e5..717469e 100644 --- a/sysdeps/ieee754/dbl-64/e_exp.c +++ b/sysdeps/ieee754/dbl-64/e_exp.c @@ -92,10 +92,10 @@ double __ieee754_exp(double x) { if (n <= smallint) return 1.0; if (n >= badint) { - if (n > infint) return(zero/zero); /* x is NaN, return invalid */ + if (n > infint) return(x+x); /* x is NaN */ if (n < infint) return ( (x>0) ? (hhuge*hhuge) : (tiny*tiny) ); /* x is finite, cause either overflow or underflow */ - if (junk1.i[LOW_HALF] != 0) return (zero/zero); /* x is NaN */ + if (junk1.i[LOW_HALF] != 0) return (x+x); /* x is NaN */ return ((x>0)?inf.x:zero ); /* |x| = inf; return either inf or 0 */ } |