pub const SIGNALING_NAN: Any;
Expand description

Generates “Signaling NaN” floats if allowed by the platform.

On most platforms, signalling NaNs by default behave the same as quiet NaNs, but it is possible to configure the OS or CPU to raise an asynchronous exception if an operation is performed on a signalling NaN.

In Rust 1.23.0 and earlier, this silently behaves the same as QUIET_NAN.

On platforms where the CPU and the IEEE standard disagree on the format of a quiet NaN, values generated conform to the hardware’s expectations.

Note that certain platforms — most notably, x86/AMD64 — allow the architecture to turn a signalling NaN into a quiet NaN with the same payload. Whether this happens can depend on what registers the compiler decides to use to pass the value around, what CPU flags are set, and what compiler settings are in use.