aboutsummaryrefslogtreecommitdiff
path: root/math/w_exp10f.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_exp10f.c
parentea3bc4e821e20e70b093c9a33e54f99c79e0d847 (diff)
downloadglibc-2a77a467b273c1a72fa204a8fcc6d22e6e20bb1c.zip
glibc-2a77a467b273c1a72fa204a8fcc6d22e6e20bb1c.tar.gz
glibc-2a77a467b273c1a72fa204a8fcc6d22e6e20bb1c.tar.bz2
Fix exp10 errno setting on underflow (bug 6787).
Diffstat (limited to 'math/w_exp10f.c')
-rw-r--r--math/w_exp10f.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/math/w_exp10f.c b/math/w_exp10f.c
index 082b34f..e2f9185 100644
--- a/math/w_exp10f.c
+++ b/math/w_exp10f.c
@@ -28,7 +28,7 @@ float
__exp10f (float x)
{
float z = __ieee754_exp10f (x);
- if (__builtin_expect (!__finitef (z), 0)
+ if (__builtin_expect (!__finitef (z) || z == 0, 0)
&& __finitef (x) && _LIB_VERSION != _IEEE_)
/* exp10f overflow (146) if x > 0, underflow (147) if x < 0. */
return __kernel_standard_f (x, x, 146 + !!__signbitf (x));