Skip to main content

is_unimplemented_nan_f32

Function is_unimplemented_nan_f32 

Source
pub const fn is_unimplemented_nan_f32(v: f32) -> bool
Expand description

Is this a NaN the VR4300’s arithmetic cannot handle?

A NaN with the significand MSB clear — quiet by this processor’s own inverted convention (ledger C-12). It cannot propagate one in hardware, so arithmetic on it raises unimplemented operation.

The complementary case is the opposite of what IEEE would lead you to expect: an MSB-set NaN is signaling here and raises the ordinary Invalid, which is_snan_f32 covers. Both NaN classes trap — they trap differently, and swapping them is invisible until FCSR is read back.