mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
fixes #4212
This commit is contained in:
@@ -356,11 +356,6 @@ proc nimParseBiggestFloat(s: string, number: var BiggestFloat,
|
||||
return i+3 - start
|
||||
return 0
|
||||
|
||||
# Skip leading zero
|
||||
while s[i] == '0':
|
||||
inc(i)
|
||||
while s[i] == '_': inc(i)
|
||||
|
||||
if s[i] in {'0'..'9'}:
|
||||
first_digit = (s[i].ord - '0'.ord)
|
||||
# Integer part?
|
||||
|
||||
@@ -13,7 +13,7 @@ proc floatToStr(f: float64): string =
|
||||
|
||||
let testFloats = [
|
||||
"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",
|
||||
"3.14159265358979323846264338327950288",
|
||||
"1.57079632679489661923132169163975144",
|
||||
|
||||
Reference in New Issue
Block a user