Is this an undefined number?

nanp expression
nan? expression

Returns true if the value of expression is an undefined number (Not-a-Number), otherwise returns false.

Example:

(print 5 nan? 5)
(print 5/0 nan? 5/0)
(print log -1 nan? log -1)

Output:

5 False
Infinity False
NaN True

See also:

Table of Content