[Python-checkins] r86284 - python/branches/py3k/Lib/test/test_strtod.py

mark.dickinson python-checkins at python.org
Sun Nov 7 11:01:46 CET 2010


Author: mark.dickinson
Date: Sun Nov  7 11:01:46 2010
New Revision: 86284

Log:
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.


Modified:
   python/branches/py3k/Lib/test/test_strtod.py

Modified: python/branches/py3k/Lib/test/test_strtod.py
==============================================================================
--- python/branches/py3k/Lib/test/test_strtod.py	(original)
+++ python/branches/py3k/Lib/test/test_strtod.py	Sun Nov  7 11:01:46 2010
@@ -387,6 +387,13 @@
             '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)


More information about the Python-checkins mailing list