aboutsummaryrefslogtreecommitdiff
path: root/stdio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1995-03-17 17:15:40 +0000
committerUlrich Drepper <drepper@redhat.com>1995-03-17 17:15:40 +0000
commitb3fe1350509737887ab1f2ac8c4efb547af80b58 (patch)
tree958f30f27ae0126822842fc9480a3dfbcf5f96af /stdio
parent61cd9516c24492da32637bb73ec26c06bb09e857 (diff)
downloadglibc-b3fe1350509737887ab1f2ac8c4efb547af80b58.zip
glibc-b3fe1350509737887ab1f2ac8c4efb547af80b58.tar.gz
glibc-b3fe1350509737887ab1f2ac8c4efb547af80b58.tar.bz2
Fri Mar 17 13:28:04 1995 Ulrich Drepper <drepper@ipd.info.uni-karlsruhe.de>
* sysdeps/ieee754/ldbl2mpn.c (__mpn_extract_long_double): Handle 80-bit denormalized numbers correct. * stdlib/strtod.c,stdlib/strtof.c,stdlib/strtold.c: [IMPLICIT_ONE,*_MAX_10_EXP_LOG]: not needed anymore. * stdlib/strtod.c (RETURN): parenthesis around return value. (round_and_return): correct handling of denormalized numbers. (__strtod_internal): don't check for grouping when not requested while returning 0.0. * stdio/fpioconst.[ch]: [LDBL_MAX_10_EXP_LOG]: don't use it. LAST_POW10 defines the maximal available exponent. * stdlib/{atof,atoi,atol}.c: use __strtoX_internal.
Diffstat (limited to 'stdio')
-rw-r--r--stdio/fpioconst.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/stdio/fpioconst.c b/stdio/fpioconst.c
index 231cae3..8d0a823 100644
--- a/stdio/fpioconst.c
+++ b/stdio/fpioconst.c
@@ -196,7 +196,8 @@ static const mp_limb _ten_p12[] =
0xae7be4a2, 0x271133ee, 0xbb0fd922, 0x25254932, 0xa60a9fc0, 0x104bcd64,
0x30290145, 0x00000062 };
-#define LAST_POW10 12
+/* This value is the index of the last array element. */
+#define _LAST_POW10 12
#elif BITS_PER_MP_LIMB == 64
@@ -369,7 +370,8 @@ static const mp_limb _ten_p12[] =
0x271133eeae7be4a2, 0x25254932bb0fd922, 0x104bcd64a60a9fc0,
0x0000006230290145 };
-#define LAST_POW10 12
+/* This value is the index of the last array element. */
+#define _LAST_POW10 12
#else
# error "mp_limb size " BITS_PER_MP_LIMB "not accounted for"
@@ -379,23 +381,23 @@ static const mp_limb _ten_p12[] =
/* Each of array variable above defines one mpn integer which is a power of 10.
This table points to those variables, indexed by the exponent. */
-const struct mp_power _fpioconst_pow10[LDBL_MAX_10_EXP_LOG + 1] =
+const struct mp_power _fpioconst_pow10[_LAST_POW10 + 1] =
{
{ _ten_p0, sizeof (_ten_p0) / sizeof (_ten_p0[0]), 4, },
- { _ten_p1, sizeof (_ten_p1) / sizeof (_ten_p0[1]), 7, 4 },
- { _ten_p2, sizeof (_ten_p2) / sizeof (_ten_p0[2]), 14, 10 },
- { _ten_p3, sizeof (_ten_p3) / sizeof (_ten_p0[3]), 27, 24 },
- { _ten_p4, sizeof (_ten_p4) / sizeof (_ten_p0[4]), 54, 50 },
- { _ten_p5, sizeof (_ten_p5) / sizeof (_ten_p0[5]), 107, 103 },
- { _ten_p6, sizeof (_ten_p6) / sizeof (_ten_p0[6]), 213, 210 },
- { _ten_p7, sizeof (_ten_p7) / sizeof (_ten_p0[7]), 426, 422 },
- { _ten_p8, sizeof (_ten_p8) / sizeof (_ten_p0[8]), 851, 848 },
- { _ten_p9, sizeof (_ten_p9) / sizeof (_ten_p0[9]), 1701, 1698 },
- { _ten_p10, sizeof (_ten_p10) / sizeof (_ten_p0[10]), 3402, 3399 },
- { _ten_p11, sizeof (_ten_p11) / sizeof (_ten_p0[11]), 6804, 6800 },
- { _ten_p12, sizeof (_ten_p12) / sizeof (_ten_p0[12]), 13607, 13604 }
+ { _ten_p1, sizeof (_ten_p1) / sizeof (_ten_p1[0]), 7, 4 },
+ { _ten_p2, sizeof (_ten_p2) / sizeof (_ten_p2[0]), 14, 10 },
+ { _ten_p3, sizeof (_ten_p3) / sizeof (_ten_p3[0]), 27, 24 },
+ { _ten_p4, sizeof (_ten_p4) / sizeof (_ten_p4[0]), 54, 50 },
+ { _ten_p5, sizeof (_ten_p5) / sizeof (_ten_p5[0]), 107, 103 },
+ { _ten_p6, sizeof (_ten_p6) / sizeof (_ten_p6[0]), 213, 210 },
+ { _ten_p7, sizeof (_ten_p7) / sizeof (_ten_p7[0]), 426, 422 },
+ { _ten_p8, sizeof (_ten_p8) / sizeof (_ten_p8[0]), 851, 848 },
+ { _ten_p9, sizeof (_ten_p9) / sizeof (_ten_p9[0]), 1701, 1698 },
+ { _ten_p10, sizeof (_ten_p10) / sizeof (_ten_p10[0]), 3402, 3399 },
+ { _ten_p11, sizeof (_ten_p11) / sizeof (_ten_p11[0]), 6804, 6800 },
+ { _ten_p12, sizeof (_ten_p12) / sizeof (_ten_p12[0]), 13607, 13604 }
};
-#if LDBL_MAX_10_EXP_LOG > LAST_POW10
-#error "Need to expand 10^(2^i) table for i up to" LDBL_MAX_10_EXP_LOG
+#if LAST_POW10 > _LAST_POW10
+#error "Need to expand 10^(2^i) table for i up to" LAST_POW10
#endif