diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-02-19 08:45:03 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-02-19 08:45:03 +0000 |
commit | 1c5247109d620c17e16b645d8356b50355065a12 (patch) | |
tree | 7e768fedc5b87f249d78691de39dc38545c4d1b1 /stdlib | |
parent | 2f7dc59492a588a9b196c13a519fb5f2e42c274d (diff) | |
download | glibc-1c5247109d620c17e16b645d8356b50355065a12.zip glibc-1c5247109d620c17e16b645d8356b50355065a12.tar.gz glibc-1c5247109d620c17e16b645d8356b50355065a12.tar.bz2 |
Update.
2003-02-19 Ulrich Drepper <drepper@redhat.com>
* stdlib/strtod.c (INTERNAL): Up the safety margin for cutting of
decimal input digits.
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/strtod.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib/strtod.c b/stdlib/strtod.c index 63a3a97..45e5abf 100644 --- a/stdlib/strtod.c +++ b/stdlib/strtod.c @@ -1,6 +1,6 @@ /* Read decimal floating point numbers. This file is part of the GNU C Library. - Copyright (C) 1995,96,97,98,99,2000,01,02 Free Software Foundation, Inc. + Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc. Contributed by Ulrich Drepper <drepper@gnu.org>, 1995. The GNU C Library is free software; you can redistribute it and/or @@ -1191,10 +1191,10 @@ INTERNAL (STRTOF) (nptr, endptr, group LOCALE_PARAM) ceil(BITS / 3) =: N digits we should have enough bits for the result. The remaining decimal digits give us the information that more bits are following. - This can be used while rounding. (One added as a safety margin.) */ - if (dig_no - int_no > (MANT_DIG - bits + 2) / 3 + 1) + This can be used while rounding. (Two added as a safety margin.) */ + if (dig_no - int_no > (MANT_DIG - bits + 2) / 3 + 2) { - dig_no = int_no + (MANT_DIG - bits + 2) / 3 + 1; + dig_no = int_no + (MANT_DIG - bits + 2) / 3 + 2; more_bits = 1; } else |