diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-11-07 10:01:46 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-11-07 10:01:46 (GMT) |
commit | baa0f0510e6df7e80e40ef459f05ecfb2cc21ae3 (patch) | |
tree | 50b4978ffa95d53ad06e332656a724bff28a9a1d /Lib/test/test_strtod.py | |
parent | c08c9bccfcdf35b3c8fd22f1b82b4575b1b99d95 (diff) | |
download | cpython-baa0f0510e6df7e80e40ef459f05ecfb2cc21ae3.zip cpython-baa0f0510e6df7e80e40ef459f05ecfb2cc21ae3.tar.gz cpython-baa0f0510e6df7e80e40ef459f05ecfb2cc21ae3.tar.bz2 |
Add a dtoa.c test value that triggered a bug in recent versions of
Gay's dtoa.c (but not for current versions of Python's dtoa.c).
Thanks Rick Regan for finding and reporting this.
Diffstat (limited to 'Lib/test/test_strtod.py')
-rw-r--r-- | Lib/test/test_strtod.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_strtod.py b/Lib/test/test_strtod.py index c30ce60..7a42a89 100644 --- a/Lib/test/test_strtod.py +++ b/Lib/test/test_strtod.py @@ -387,6 +387,13 @@ class StrtodTests(unittest.TestCase): '999999999999999944488848768742172978818416595458984375e-54', '9999999999999999444888487687421729788184165954589843749999999e-54', '9999999999999999444888487687421729788184165954589843750000001e-54', + # Value found by Rick Regan that gives a result of 2**-968 + # under Gay's dtoa.c (as of Nov 04, 2010); since fixed. + # (Fixed some time ago in Python's dtoa.c.) + '0.0000000000000000000000000000000000000000100000000' #... + '000000000576129113423785429971690421191214034235435' #... + '087147763178149762956868991692289869941246658073194' #... + '51982237978882039897143840789794921875', ] for s in test_strings: self.check_strtod(s) |