RosettaCodeData/Task/Extreme-floating-point-values/Ol/extreme-floating-point-values.ol
2020-02-17 23:21:07 -08:00

6 lines
260 B
Text

(print "infinity: " (/ 1 (inexact 0))
(print "minus infinity: " (/ -1 (inexact 0))
(print "not-a-number: " (/ 0 (inexact 0))
; note: your must use equal? or eqv? but not eq? for comparison
(print "is this is not a number? " (equal? (/ 0 (inexact 0)) +nan.0))