Technical Considerations
NaNs
When a numeric operation cannot produce a meaningful result, the operation delivers a special bit pattern called a NaN
A NaN may have an associated code that indicates its origin.
NaN Meaning
1 Invalid square root, such as
2Invalid addition, such as (+°) +
4 Invalid division, such as 0Ö0
8 Invalid multiplication, such as 0x°
9 Invalid remainder or modulo, such as x rem 0 17 Attempt to convert invalid ASCII string
21 Attempt to create a NaN with a zero code
33 Invalid argument to trigonometric function (such as cos, sin, tan)
34 Invalid argument to inverse trigonometric function (such as acos, asin, atan)
36 Invalid argument to logarithmic function (such as log,
log10)
37Invalid argument to exponential function (such as exp, expm1)
38Invalid argument to financial function (compound or annuity)
40Invalid argument to inverse hyperbolic function (such as acosh, asinh)
42 Invalid argument to gamma function (gamma or lgamma)
Zeroes
Each
Ordinarily, the sign of zero does not matter except (possibly) for a function discontinuous at zero. Though the two forms are numerically equal, a program can distinguish +0 from
The sign of zero obeys the usual sign laws for multiplication and division. For example,
Technical Considerations
39
iMalc Manual