tests/float/float_parse.py: Add tests for accuracy of small decimals.

pull/1/head
Damien George 2018-09-20 22:26:53 +10:00
parent b768cc6ca8
commit 9849209ad8
1 changed files with 4 additions and 0 deletions

View File

@ -30,3 +30,7 @@ print(float('1e4294967301'))
print(float('1e-4294967301'))
print(float('1e18446744073709551621'))
print(float('1e-18446744073709551621'))
# check small decimals are as close to their true value as possible
for n in range(1, 10):
print(float('0.%u' % n) == n / 10)