This commit is contained in:
Dominik Picheta 2014-04-20 22:35:17 +01:00
commit ca2b73f64a

View file

@ -252,10 +252,8 @@ proc nimIntToStr(x: int): string {.compilerRtl.} =
proc nimFloatToStr(x: float): string {.compilerproc.} = proc nimFloatToStr(x: float): string {.compilerproc.} =
var buf: array [0..59, char] var buf: array [0..59, char]
c_sprintf(buf, "%#.f", x) c_sprintf(buf, "%#.16e", x)
result = $buf return $buf
if result[len(result)-1] == '.':
result.add("0")
proc nimInt64ToStr(x: int64): string {.compilerRtl.} = proc nimInt64ToStr(x: int64): string {.compilerRtl.} =
result = newString(sizeof(x)*4) result = newString(sizeof(x)*4)