resetIeeeFlags

Set all of the floating-point status flags to false.

version(IeeeFlagsSupport)
@trusted nothrow @nogc
void
resetIeeeFlags
()

Examples

pragma(inline, false) static void blockopt(ref real x) {}
resetIeeeFlags();
real a = 3.5;
blockopt(a); // avoid constant propagation by the optimizer
a /= 0.0L;
blockopt(a); // avoid constant propagation by the optimizer
assert(a == real.infinity);
assert(ieeeFlags.divByZero);

resetIeeeFlags();
assert(!ieeeFlags.divByZero);

Meta

Suggestion Box / Bug Report