Skip to main content

arith_unimplemented_s

Function arith_unimplemented_s 

Source
pub const fn arith_unimplemented_s(a: f32, b: f32) -> bool
Expand description

Do these arithmetic operands force unimplemented operation before the operation is even attempted?

Operand subnormality wins over everything, including a NaN that would otherwise raise Invalid: n64-systemtest pairs a quiet NaN with a subnormal and expects unimplemented, not invalid.

Applies to ADD/SUB/MUL/DIV only. Compares are exempt — the suite’s compare tests expect a subnormal operand to compare as an ordinary number with no flags at all. Worth stating, because “this FPU cannot do subnormals” sounds like it should be universal and is not.