mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-29 10:43:57 +00:00
printing float values will have one more digit. (#13276) [backport]
* printing float values will have one more digit. Fixes #13196
This commit is contained in:
@@ -29,7 +29,7 @@ proc writeFloatToBuffer*(buf: var array[65, char]; value: BiggestFloat): int =
|
||||
## * `buf` - A buffer to write into. The buffer does not need to be
|
||||
## initialized and it will be overridden.
|
||||
##
|
||||
var n: int = c_sprintf(addr buf, "%.16g", value)
|
||||
var n: int = c_sprintf(addr buf, "%.17g", value)
|
||||
var hasDot = false
|
||||
for i in 0..n-1:
|
||||
if buf[i] == ',':
|
||||
|
||||
Reference in New Issue
Block a user