https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105924
Lin-Hui Ye <yelinhui at hotmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #2 from Lin-Hui Ye <yelinhui at hotmail dot com> --- Sorry I didn't know this is an underflow. I was expecting exp(-160000) 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 = 160000 > -e*e = -160000 > exp(-e*e) = exp(-160000) <-- 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).