Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » Thing » Number » isANumber
next | previous | forward | backward | up | index | toc

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

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:

  • isANumber(Number)

For the programmer

The object isANumber is a compiled function.


The source of this document is in Macaulay2Doc/ov_analytic_functions.m2:513:0.