1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Fix exp10 errno setting on underflow (bug 6787).

This commit is contained in:
Joseph Myers
2013-11-29 16:32:49 +00:00
parent ea3bc4e821
commit 2a77a467b2
6 changed files with 26 additions and 16 deletions

View 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));