diff --git a/lib/system/sysstr.nim b/lib/system/sysstr.nim index 64d6634d26..50adca4801 100644 --- a/lib/system/sysstr.nim +++ b/lib/system/sysstr.nim @@ -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? diff --git a/tests/float/tfloat4.nim b/tests/float/tfloat4.nim index 960c4e5f71..9bc8cfffff 100644 --- a/tests/float/tfloat4.nim +++ b/tests/float/tfloat4.nim @@ -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",