Trace:

nan

This shows you the differences between two versions of the page.

Both sides previous revision Previous revision Next revision | Previous revision | ||

nan [Sun Oct 31 19:05:42 2010] Gray |
nan [Sat Jan 16 20:07:19 2021] (current) Alexander |
||
---|---|---|---|

Line 2: | Line 2: | ||

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. | 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: if ''. | + | |

==== How does a NaN appear? ==== | ==== How does a NaN appear? ==== | ||

Line 36: | Line 34: | ||

===== NaN in Expressions ===== | ===== NaN in Expressions ===== | ||

You can use predefined constants '' | You can use predefined constants '' | ||

+ | |||

+ | The '' | ||

=== Example === | === Example === | ||

- | * If you set [[set_column_formula|Column Formula]] ''returns only positive values from column B. Negative values are replaced with NaN value. You can use this expression to filter negative values if you do not want to use them in future calculations. Note that // | + | * If you set a [[set_column_formula|Column Formula]] ''will return only positive values from column B. Negative values are replaced with NaN value. You can use this expression to filter negative values if you do not want to use them in future calculations. Note that // |

nan.1288541142.txt.gz · Last modified: Sun Nov 8 12:20:32 2015 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International