From 835bd9aef23b98e101c3e251cd9f3045f016d766 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Wed, 25 May 2016 01:10:31 +0200 Subject: [PATCH] fixes #4212 --- lib/system/sysstr.nim | 5 ----- tests/float/tfloat4.nim | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) 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",