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

Fix sign of zero on strtod underflow (bug 14519).

This commit is contained in:
Joseph Myers
2012-08-27 16:04:19 +00:00
parent af92131a8e
commit 7efb4737dd
5 changed files with 117 additions and 2 deletions

View File

@ -183,7 +183,7 @@ round_and_return (mp_limb_t *retval, intmax_t exponent, int negative,
if (exponent < MIN_EXP - 1 - MANT_DIG)
{
__set_errno (ERANGE);
return 0.0;
return negative ? -0.0 : 0.0;
}
mp_size_t shift = MIN_EXP - 1 - exponent;