Macaulay2 » Documentation
Packages » Macaulay2Doc :: isANumber
next | previous | forward | backward | up | index | toc

isANumber -- whether a number is not not-a-number

Synopsis

Description

For a discussion of the notion of not-a-number in floating point arithmetic, see http://en.wikipedia.org/wiki/NaN.

i1 : isANumber 3.

o1 = true
i2 : inf = 1/0.

o2 = infinity

o2 : RR (of precision 53)
i3 : isANumber inf

o3 = true
i4 : nan = inf - inf

o4 = NotANumber

o4 : RR (of precision 53)
i5 : isANumber nan

o5 = false

See also

Ways to use isANumber :

For the programmer

The object isANumber is a compiled function.