On x86_64 (not x86), exp10 (-DBL_MAX) raises a spurious overflow exception. Testcase: #include <errno.h> #include <fenv.h> #include <math.h> #include <stdio.h> #include <float.h> volatile double d = -DBL_MAX; int main (void) { feclearexcept (FE_ALL_EXCEPT); errno = 0; volatile double r = exp10 (d); if (fetestexcept (FE_DIVBYZERO)) printf ("DIVBYZERO "); if (fetestexcept (FE_INEXACT)) printf ("INEXACT "); if (fetestexcept (FE_INVALID)) printf ("INVALID "); if (fetestexcept (FE_OVERFLOW)) printf ("OVERFLOW "); if (fetestexcept (FE_UNDERFLOW)) printf ("UNDERFLOW "); printf ("%.18g %m\n", r); return 0; }
Fixed (except for x86/x86_64 long double, which is bug 13914) by: commit 9568c0c2255045456a09b441f89c6641e27a4bec Author: Joseph Myers <joseph@codesourcery.com> Date: Mon Apr 30 09:37:01 2012 +0000 Fix exp10 spurious overflows (bug 13924).