summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2019-12-17 10:25:46 +0000
committerAndreas Rumpf <rumpf_a@web.de>2019-12-17 11:25:46 +0100
commit7650617448dad812204a10218133c685b9e3d746 (patch)
tree1e2d6970551dca2e64a19fb23f5436a713d80ae7 /lib/system
parente8f4586c68dbe111ac50b9ec86f7630040492d09 (diff)
downloadNim-7650617448dad812204a10218133c685b9e3d746.tar.gz
NaN floatFormat with clang_cl (#12910)
* clang_cl nan floatFormat

* format
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/formatfloat.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/formatfloat.nim b/lib/system/formatfloat.nim
index dbe9a4145..cb46c8c36 100644
--- a/lib/system/formatfloat.nim
+++ b/lib/system/formatfloat.nim
@@ -44,10 +44,10 @@ proc writeFloatToBuffer*(buf: var array[65, char]; value: BiggestFloat): int =
     result = n + 2
   else:
     result = n
-  # On Windows nice numbers like '1.#INF', '-1.#INF' or '1.#NAN'
+  # On Windows nice numbers like '1.#INF', '-1.#INF' or '1.#NAN' or 'nan(ind)'
   # of '-1.#IND' are produced.
   # We want to get rid of these here:
-  if buf[n-1] in {'n', 'N', 'D', 'd'}:
+  if buf[n-1] in {'n', 'N', 'D', 'd', ')'}:
     writeToBuffer(buf, "nan")
     result = 3
   elif buf[n-1] == 'F':