The OpenD Programming Language

isNaN

Determines if x is NaN.

@nogc @trusted pure nothrow
bool
isNaN
(
X
)
(
X x
)

Parameters

x X

a floating point number.

Return Value

Type: bool

true if x is Nan.

Examples

assert( isNaN(float.init));
assert( isNaN(-double.init));
assert( isNaN(real.nan));
assert( isNaN(-real.nan));
assert(!isNaN(cast(float) 53.6));
assert(!isNaN(cast(real)-53.6));

Meta