diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2020-02-08 00:30:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-08 09:30:24 +0100 |
commit | e4415422fe2b615a6dfe01bb7136ec41ef429108 (patch) | |
tree | 8e9f45c193aad54fa60c79cdc8e5f1981cea04cf /lib/system/formatfloat.nim | |
parent | f3117d350ea245769d60a80b2d12b062cff4b8ff (diff) | |
download | Nim-e4415422fe2b615a6dfe01bb7136ec41ef429108.tar.gz |
Revert "printing float values will have one more digit. (#13276) [backport]" (#13363)
This reverts commit b2c6db97f9f477f6999fa9c7aae5e32f10b6b3fe.
Diffstat (limited to 'lib/system/formatfloat.nim')
-rw-r--r-- | lib/system/formatfloat.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/formatfloat.nim b/lib/system/formatfloat.nim index abacca4df..cb46c8c36 100644 --- a/lib/system/formatfloat.nim +++ b/lib/system/formatfloat.nim @@ -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, "%.17g", value) + var n: int = c_sprintf(addr buf, "%.16g", value) var hasDot = false for i in 0..n-1: if buf[i] == ',': |