diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-02-11 13:11:40 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-02-11 13:11:40 +0000 |
commit | 4a7ceb5a83feade78f5a35b2f82ff1c6c8ea7fcb (patch) | |
tree | ca55af9bf0f28cc7a14419113fa87ce72b97e836 /stdlib/strtod.c | |
parent | 1eb687d0b865ea0d97bb774b23a764f1c4369475 (diff) | |
download | glibc-4a7ceb5a83feade78f5a35b2f82ff1c6c8ea7fcb.tar glibc-4a7ceb5a83feade78f5a35b2f82ff1c6c8ea7fcb.tar.gz glibc-4a7ceb5a83feade78f5a35b2f82ff1c6c8ea7fcb.tar.bz2 glibc-4a7ceb5a83feade78f5a35b2f82ff1c6c8ea7fcb.zip |
Update.
1998-02-11 08:30 H.J. Lu <hjl@gnu.org>
* sysdeps/libm-ieee754/w_powl.c (__powl): Use __finitel instead
of __finite.
Diffstat (limited to 'stdlib/strtod.c')
-rw-r--r-- | stdlib/strtod.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/stdlib/strtod.c b/stdlib/strtod.c index e93ec9add2..061cedc98a 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, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. The GNU C Library is free software; you can redistribute it and/or @@ -1091,10 +1091,15 @@ INTERNAL (STRTOF) (nptr, endptr, group LOCALE_PARAM) count_leading_zeros (cnt, den[densize - 1]); - (void) __mpn_lshift (den, den, densize, cnt); - cy = __mpn_lshift (num, num, numsize, cnt); - if (cy != 0) - num[numsize++] = cy; + if (cnt > 0) + { + /* Don't call `mpn_shift' with a count of zero since the specification + does not allow this. */ + (void) __mpn_lshift (den, den, densize, cnt); + cy = __mpn_lshift (num, num, numsize, cnt); + if (cy != 0) + num[numsize++] = cy; + } /* Now we are ready for the division. But it is not necessary to do a full multi-precision division because we only need a small |