HyperMath

Inf and NaN

Inf and NaN

Previous topic Next topic No expanding text in this topic  

Inf and NaN

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Both Infinity and Not-a-Number data types are supported.  There are two keywords, Inf and NaN, reserved for these.  Basic IEEE defined operations can be performed on these types. There are also functions for checking these types.  See the topic Checks for more information.

> x = 1/0

> print(x)

Inf

> x = 0/0

> print(x)

NaN

> print(Inf + NaN)

NaN

> print(1 + Inf)

Inf