fixes #4212
This commit is contained in:
parent
bcc91a319c
commit
835bd9aef2
2 changed files with 1 additions and 6 deletions
|
|
@ -356,11 +356,6 @@ proc nimParseBiggestFloat(s: string, number: var BiggestFloat,
|
||||||
return i+3 - start
|
return i+3 - start
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
# Skip leading zero
|
|
||||||
while s[i] == '0':
|
|
||||||
inc(i)
|
|
||||||
while s[i] == '_': inc(i)
|
|
||||||
|
|
||||||
if s[i] in {'0'..'9'}:
|
if s[i] in {'0'..'9'}:
|
||||||
first_digit = (s[i].ord - '0'.ord)
|
first_digit = (s[i].ord - '0'.ord)
|
||||||
# Integer part?
|
# Integer part?
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ proc floatToStr(f: float64): string =
|
||||||
|
|
||||||
let testFloats = [
|
let testFloats = [
|
||||||
"0", "-1", "1", "1.", ".3", "3.3", "-.3", "-99.99",
|
"0", "-1", "1", "1.", ".3", "3.3", "-.3", "-99.99",
|
||||||
"1.1e10", "-2e100", "1.234e-10", "1.234e+10",
|
"1.1e10", "-2e100", "1.234e-10", "1.234e+10", "-0.0",
|
||||||
"-inf", "inf", "+inf",
|
"-inf", "inf", "+inf",
|
||||||
"3.14159265358979323846264338327950288",
|
"3.14159265358979323846264338327950288",
|
||||||
"1.57079632679489661923132169163975144",
|
"1.57079632679489661923132169163975144",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue