Is this an infinity?

Positive or negative infinity

infp expression
inf? expression

Positive infinity

posinfp expression
posinf? expression

Negative infinity

neginfp expression
neginf? expression

Returns true if the value of expression is an infinity, otherwise returns false.

Example:

(print 5 inf? 5)
(print 5/0 inf? 5/0)
(print 5/0 neginf? 5/0)
(print -5/0 neginf? -5/0)
(print log -1 inf? log -1)

Output:

5 False
Infinity True
Infinity False
-Infinity True
NaN False

See also:

Table of Content