+2004-07-21 Jakub Jelinek <jakub@redhat.com>
+
+ [BZ #274]
+ * stdlib/strtod_l.c (INTERNAL (__STRTOF)): Fix used >=
+ BITS_PER_MP_LIMB shifting up.
+ * stdlib/tst-strtod.c (main): Add new tests.
+
2004-07-23 Jakub Jelinek <jakub@redhat.com>
[BZ #282]
/ BITS_PER_MP_LIMB],
retval, RETURN_LIMB_SIZE,
used % BITS_PER_MP_LIMB);
- for (i = used / BITS_PER_MP_LIMB; i >= 0; --i)
+ for (i = used / BITS_PER_MP_LIMB - 1; i >= 0; --i)
retval[i] = 0;
}
else if (used > 0)
status = 1;
}
+ static struct { const char *str; long double l; } ltests[] =
+ {
+ { "42.0000000000000000001", 42.0000000000000000001L },
+ { "42.00000000000000000001", 42.00000000000000000001L },
+ { "42.000000000000000000001", 42.000000000000000000001L }
+ };
+ int n;
+ for (n = 0; n < sizeof (ltests) / sizeof (ltests[0]); ++n)
+ if (strtold (ltests[n].str, NULL) != ltests[n].l)
+ {
+ printf ("ltests[%d]: %La != %La\n", n,
+ strtold (ltests[n].str, NULL), ltests[n].l);
+ status = 1;
+ }
+
status |= long_dbl ();
status |= locale_test ();