Skip to content

Modern Math NaN

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Math Library › Math Library › NaN

NaN

Returns a Double that is NaN, not a number.

Syntax

NaN( )

Examples

#import "std/numeric"
using numeric

dim as float64 n = NaN( )

print IsNaN( n )             '' true

'' It POISONS everything downstream, which is what makes it a useful
'' sentinel and a dangerous one
print IsNaN( n + 1 )         '' true
print IsNaN( n * 0 )         '' true

'' NaNF is the single-precision one

Library: Math Library
Category: Math Library
Documented under: Nothing Becomes A Keyword

Clone this wiki locally