[Bug fortran/105924] false floating point exception when evaluating exponential function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105924 Lin-Hui Ye changed: What|Removed |Added Status|RESOLVED|CLOSED --- Comment #2 from Lin-Hui Ye --- Sorry I didn't know this is an underflow. I was expecting exp(-16) to give a value close to zero. Thanks for the explanation. Linhui (In reply to kargl from comment #1) > Why do you thing that you should not get an exception? > > e = -400 > e*e = 16 > -e*e = -16 > exp(-e*e) = exp(-16) <-- This is going to underflow to zero. > > You specifically asked gfortran to signal an exception if > underflow occurs with the -ffpe-trap=underflow option. The > underflow threshold occurs at x = -745 for exp(x).
[Bug fortran/105924] false floating point exception when evaluating exponential function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105924 kargl at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||kargl at gcc dot gnu.org Resolution|--- |INVALID --- Comment #1 from kargl at gcc dot gnu.org --- Why do you thing that you should not get an exception? e = -400 e*e = 16 -e*e = -16 exp(-e*e) = exp(-16) <-- This is going to underflow to zero. You specifically asked gfortran to signal an exception if underflow occurs with the -ffpe-trap=underflow option. The underflow threshold occurs at x = -745 for exp(x).