[racket-dev] Equality test for Not-A-Number
What is the correct way to test for +nan.0 in Racket? For example, (= +nan.0
+nan.0) = #f. This seems to be the behavior specified in R6RS. In the
science collection I implemented nan? using eqv?, which seems to work in
Racket; but the result is explicitly unspecified in R6RS, which I assume
means that it's up to the implementation. Which pretty much leaves eq? as
the proper test. R6RS includes primitives like nan? and infinite?, which I
included a long time ago in the science collection. Obviously one can use
them from the r6rs libraries, but should they be moved into the racket
language?
Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20101027/071dc77e/attachment.html>