\(\text{IsNaN}\)

You can use the \(\text{IsNaN}\) function to determine if a real value is NaN or ‘not a number’.

You can use the \isnan backslash command to insert this function.

The following variants of this function are available:

  • \(\text{boolean } \text{IsNaN} \left ( \text{<value>} \right )\)

Functions and operators will result in NaN under the following circumstances:

  • Cases where the operator or function’s value is undefined. Example would be the result of \(\frac{0}{0}\).

  • Cases where a function is not defined for the value of one or more supplied parameters.

  • Certain error conditions.

Figure 158 shows the basic use of the \(\text{IsNaN}\) function.

../_images/isnan_example.png

Figure 158 Example Use Of The IsNaN Function