Functions > Data Analysis > Outliers and NaN > About the NaN (Not a Number) Built-In Constant
  
About the NaN (Not a Number) Built-In Constant
The built-in PTC Mathcad constant NaN represents a missing or faulted value. It is useful for representing missing values in data sets, because it can be an array entry that you can easily distinguish from other matrix contents. It is also useful because PTC Mathcad matrices cannot have empty placeholders.
The value of NaN is NaN, that is, if you type NaN= in a worksheet, PTC Mathcad returns NaN and assigns it the Constant label.
You detect NaNs using the IsNaN function, because boolean comparison operations can only be used on numbers. If you redefine the constant name NaN to some other value, it is no longer a NaN, and the IsNaN function returns 0. A NaN can only be processed by functions specifically written to use it. Other functions may return errors or incorrect results if passed a NaN.
The NaN-related functions:
work exclusively with the NaN built-in constant.
either write the NaN built-in constant to one or more specified array elements or read one or more specified array elements and check their content for the NaN constant.
can filter out specified rows that contain the NaN constant.
ignore anything that is not a NaN constant — such as numbers or strings.