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 |
The object isANumber is a compiled function.