This commit is contained in:
commit
568474d52f
1591 files changed
+528213
No files matched your search
@@ -0,0 +1,26 @@
|
||||
# probe: which decimal texts does atof read, and as which Float64? (signs, exponents, leading zeros, a bare point, many digits, the smallest subnormal, past the range)
|
||||
def show(t: String):
|
||||
try:
|
||||
print(t, "->", atof(t))
|
||||
except e:
|
||||
print(t, "-> raised:", e)
|
||||
|
||||
|
||||
def main():
|
||||
show("2.5")
|
||||
show("1e3")
|
||||
show("-0.125")
|
||||
show("10")
|
||||
show("007.5")
|
||||
show("0.1")
|
||||
show("+3")
|
||||
show(".5")
|
||||
show("5.")
|
||||
show("-0")
|
||||
show("1E-2")
|
||||
show("123456789012345678901234567890")
|
||||
show("2.2250738585072011e-308")
|
||||
show("4.9e-324")
|
||||
show("1e400")
|
||||
show("1e-400")
|
||||
show("0.30000000000000004")
|
||||
Reference in new issue
Block a user