summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2018-11-08 20:17:37 +0100
committerGitHub <noreply@github.com>2018-11-08 20:17:37 +0100
commit6a57ec6d2ea85ebc279eaf0bea4efd81da8b6a06 (patch)
treed01b6b0c39bd6be4b32a69dc393ad08feaa28984 /lib/system.nim
parent3cf3c2d722775ee3fc265e1c53733645277171e5 (diff)
downloadNim-6a57ec6d2ea85ebc279eaf0bea4efd81da8b6a06.tar.gz
NaN fixes for clang backend (#9652)
Diffstat (limited to 'lib/system.nim')
-rw-r--r--lib/system.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 83745e0dc..209951aac 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -2041,11 +2041,11 @@ proc getRefcount*[T](x: seq[T]): int {.importc: "getRefcount", noSideEffect,
 
 
 const
-  Inf* {.magic: "Inf".} = 1.0 / 0.0
+  Inf* = 0x7FF0000000000000'f64
     ## contains the IEEE floating point value of positive infinity.
-  NegInf* {.magic: "NegInf".} = -Inf
+  NegInf* = 0xFFF0000000000000'f64
     ## contains the IEEE floating point value of negative infinity.
-  NaN* {.magic: "NaN".} = 0.0 / 0.0
+  NaN* = 0x7FF7FFFFFFFFFFFF'f64
     ## contains an IEEE floating point value of *Not A Number*. Note
     ## that you cannot compare a floating point value to this value
     ## and expect a reasonable result - use the `classify` procedure