]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - math/w_exp10l.c
Fix exp10 errno setting on underflow (bug 6787).
[thirdparty/glibc.git] / math / w_exp10l.c
index 10f3f81fe091c5e9873e162d3c5c99cd8e7de375..19facddee64ffe409b6bad2b859edc0534bc7afe 100644 (file)
@@ -28,7 +28,7 @@ long double
 __exp10l (long double x)
 {
   long double z = __ieee754_exp10l (x);
-  if (__builtin_expect (!__finitel (z), 0)
+  if (__builtin_expect (!__finitel (z) || z == 0, 0)
       && __finitel (x) && _LIB_VERSION != _IEEE_)
     /* exp10l overflow (246) if x > 0, underflow (247) if x < 0.  */
     return __kernel_standard_l (x, x, 246 + !!__signbitl (x));