Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit baa0f05

Browse files
committed
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.
1 parent c08c9bc commit baa0f05

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lib/test/test_strtod.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,13 @@ def test_particular(self):
387387
'999999999999999944488848768742172978818416595458984375e-54',
388388
'9999999999999999444888487687421729788184165954589843749999999e-54',
389389
'9999999999999999444888487687421729788184165954589843750000001e-54',
390+
# Value found by Rick Regan that gives a result of 2**-968
391+
# under Gay's dtoa.c (as of Nov 04, 2010); since fixed.
392+
# (Fixed some time ago in Python's dtoa.c.)
393+
'0.0000000000000000000000000000000000000000100000000' #...
394+
'000000000576129113423785429971690421191214034235435' #...
395+
'087147763178149762956868991692289869941246658073194' #...
396+
'51982237978882039897143840789794921875',
390397
]
391398
for s in test_strings:
392399
self.check_strtod(s)

0 commit comments

Comments
 (0)