Damien George | 84895f1 | 2017-11-27 12:51:52 +1100 | [diff] [blame^] | 1 | # test parsing of floats, requiring double-precision |
| 2 | |
| 3 | # very large integer part with a very negative exponent should cancel out |
| 4 | print(float('9' * 400 + 'e-100')) |
| 5 | print(float('9' * 400 + 'e-200')) |
| 6 | print(float('9' * 400 + 'e-400')) |
| 7 | |
| 8 | # many fractional digits |
| 9 | print(float('.' + '9' * 400)) |
| 10 | print(float('.' + '9' * 400 + 'e100')) |
| 11 | print(float('.' + '9' * 400 + 'e-100')) |
| 12 | |
| 13 | # tiny fraction with large exponent |
| 14 | print(float('.' + '0' * 400 + '9e100')) |
| 15 | print(float('.' + '0' * 400 + '9e200')) |
| 16 | print(float('.' + '0' * 400 + '9e400')) |