NaN

By using NaN (Not a Number) in an IF-THEN-ELSE function it possible to test whether a result is infinite. Infinite values arise if a number is divided by "0".

 

Syntax

IF ([120]/[121]) = NaN then 0 else ([120]/[121])

 

First the function tests whether [120]/[121] is NaN. If so the value 0 is returned, otherwise the result of the function is returned in the usual way.

 

How to create

Use the NaN button in the calculator to add a test for infinite results to an IF-THEN-ELSE function.

 

Calculations with NA and NaN

Some examples of calculations using NA and NaN

Function

Result

NA+NA

NA

NA/NA

NA

5/NA

NA

NA/5

NA

5+NA

5

5+(NA+NA)

5

5+(NA/NA)

5

NaN+NA

NaN

NaN-NA

NaN

NaN*NA

NA

NaN/NA

NA

 

Anything divided by NA is NA.

 Any number or variable divided by 0 will give NaN, e.g. NA/0, 1/0 or x/0 will all give NaN.

 

 

 

Version 5.1.2.0

This document contains confidential information. Not to be copied by third parties without written authorization.

© Copyright Corporater AS - All rights reserved.