This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
nan [Sun Dec 20 22:35:54 2009] Alexander |
nan [Sun Nov 8 12:21:24 2015] 127.0.0.1 external edit |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== NaN ====== | + | ====== |
- | In computing, NaN, which stands for Not a Number, is a value or symbol that is usually produced as the result of an operation on invalid input operands, especially in floating-point calculations. For example, most floating-point units are unable to explicitly calculate the square root of negative numbers, and will instead indicate that the operation was invalid and return a NaN result. | + | In computing, NaN, which stands for Not a Number, is a value or symbol that is usually produced as a result of an operation on invalid input operands. For example, most floating-point units are unable to explicitly calculate the square root of negative numbers, and will instead indicate that the operation was invalid and return a NaN result. |
+ | |||
+ | An invalid operation is not the same as an arithmetic overflow (which returns a positive or negative infinity). Arithmetic operations involving NaN always produce NaN, allowing the value to propagate through a calculation so that errors can be detected at the end without extensive testing during intermediate stages. A NaN does not compare equal to any number or NaN. | ||
+ | |||
+ | ==== How does a NaN appear? ==== | ||
+ | |||
+ | There are three kinds of operations which return NaN: | ||
+ | - Operations with a NaN as at least one operand, e.g. '' | ||
+ | - Indeterminate forms | ||
+ | * Divisions '' | ||
+ | * Multiplications '' | ||
+ | * Power '' | ||
+ | * Additions '' | ||
+ | - Real operations with complex results | ||
+ | * Square root of a negative number | ||
+ | * Logarithm of a negative number | ||
+ | * Tangent of an odd multiple of 90 degrees (or //π///2 radians) | ||
+ | * Inverse sine or cosine of a number which is less than -1 or greater than +1. | ||
+ | |||
+ | === Examples === | ||
+ | ^ Expression | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | ===== NaN in MagicPlot Tables ===== | ||
+ | In MagicPlot NaN is also used to represent | ||
+ | |||
+ | Statistical functions ignore NaN values in Tables. | ||
+ | |||
+ | ===== NaN in Expressions ===== | ||
+ | You can use predefined constants '' | ||
+ | |||
+ | === Example === | ||
+ | * If you set a [[set_column_formula|Column Formula]] '' |