ieeeFlags

version(IeeeFlagsSupport)
@property @trusted pure nothrow @nogc
ieeeFlags
()

Return Value

Type: IeeeFlags

snapshot of the current state of the floating-point status flags

Examples

import std.math.traits : isNaN;

resetIeeeFlags();
real a = 3.5;

a /= 0.0L;
assert(a == real.infinity);
assert(ieeeFlags.divByZero);

a *= 0.0L;
assert(isNaN(a));
assert(ieeeFlags.invalid);

Meta