NaN

Create a quiet NaN, storing an integer inside the payload.

For floats, the largest possible payload is 0x3F_FFFF. For doubles, it is 0x3_FFFF_FFFF_FFFF. For 80-bit or 128-bit reals, it is 0x3FFF_FFFF_FFFF_FFFF.

@trusted pure nothrow @nogc
real
NaN
(
ulong payload
)

Examples

import std.math.traits : isNaN;

real a = NaN(1_000_000);
assert(isNaN(a));
assert(getNaNPayload(a) == 1_000_000);

Meta