summaryrefslogtreecommitdiff
path: root/math/w_exp10l.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-11-29 16:32:49 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-11-29 16:32:49 +0000
commit2a77a467b273c1a72fa204a8fcc6d22e6e20bb1c (patch)
tree6794ce10caf493365044d4bd4197c563244d1031 /math/w_exp10l.c
parentea3bc4e821e20e70b093c9a33e54f99c79e0d847 (diff)
Fix exp10 errno setting on underflow (bug 6787).
Diffstat (limited to 'math/w_exp10l.c')
-rw-r--r--math/w_exp10l.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/math/w_exp10l.c b/math/w_exp10l.c
index 10f3f81fe0..19facddee6 100644
--- a/math/w_exp10l.c
+++ b/math/w_exp10l.c
@@ -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));