This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
nan [Tue Jan 12 00:54:48 2010] Alexander |
nan [Sat Jan 16 20:07:19 2021] Alexander |
||
---|---|---|---|
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. 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. | + | 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. |
- | A NaN does not compare equal to any number or NaN. You can therefore test whether a variable has a NaN value by comparing it to itself, thus if '' | + | ==== How does a NaN appear? ==== |
- | ==== How is a NaN created? ==== | + | There are three kinds of operations |
- | + | - Operations with a NaN as at least one operand, e.g. '' | |
- | There are three kinds of operation | + | |
- | - Operations with a NaN as at least one operand | + | |
- Indeterminate forms | - Indeterminate forms | ||
- | * The divisions | + | * Divisions '' |
- | * The multiplications 0×∞ and 0×-∞ | + | * Multiplications '' |
- | * The power 1^∞ | + | * Power '' |
- | * The additions | + | * Additions '' |
- Real operations with complex results | - Real operations with complex results | ||
- | * The square | + | * Square |
- | * The logarithm | + | * Logarithm |
- | * The tangent | + | * Tangent |
- | * The inverse | + | * Inverse |
- | + | ||
- | ===== NaN in MagicPlot Tables ===== | + | |
- | In MagicPlot NaN also is used to represent empty cells in tables. | + | |
- | + | ||
- | Statistical functions ignores NaN values in tables. | + | |
- | + | ||
- | ===== NaN in Expressions ===== | + | |
- | You can use a predefined constants '' | + | |
- | + | ||
- | ===== Examples ===== | + | |
+ | === Examples === | ||
^ Expression | ^ Expression | ||
| '' | | '' | ||
Line 37: | Line 26: | ||
| '' | | '' | ||
| '' | | '' | ||
+ | |||
+ | ===== NaN in MagicPlot Tables ===== | ||
+ | In MagicPlot NaN is also used to represent empty cells in [[table|Tables]]. | ||
+ | |||
+ | Statistical functions ignore NaN values in Tables. | ||
+ | |||
+ | ===== NaN in Expressions ===== | ||
+ | You can use predefined constants '' | ||
+ | |||
+ | The '' | ||
+ | |||
+ | === Example === | ||
+ | * If you set a [[set_column_formula|Column Formula]] '' |