use .f instead of .16e for floats

It doesn't write a trailing zero, but it's better than floats being all
over your screen.
This commit is contained in:
Simon Hafner
2014-02-11 15:06:24 -06:00
parent a158053ae9
commit 4b09baa0a0

View File

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