1# test parsing of floats, requiring double-precision
2
3# very large integer part with a very negative exponent should cancel out
4print(float("9" * 400 + "e-100"))
5print(float("9" * 400 + "e-200"))
6print(float("9" * 400 + "e-400"))
7
8# many fractional digits
9print(float("." + "9" * 400))
10print(float("." + "9" * 400 + "e100"))
11print(float("." + "9" * 400 + "e-100"))
12
13# tiny fraction with large exponent
14print("%.14e" % float("." + "0" * 400 + "9e100"))
15print("%.14e" % float("." + "0" * 400 + "9e200"))
16print("%.14e" % float("." + "0" * 400 + "9e400"))
17
18# ensure that accuracy is retained when value is close to a subnormal
19print(float("1.00000000000000000000e-307"))
20print(float("10.0000000000000000000e-308"))
21print(float("100.000000000000000000e-309"))
22