mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 16:43:05 -05:00
A subnormal operand sent v_fma_f64 to a separate multiply and add, and a subnormal result was rounded twice: once to 53 bits in the scaled domain and again by the power-of-two rescale. Both differ from IEEE 754 fusedMultiplyAdd in the last bit. Subnormal operands are now widened by 2^64 and enter the exact path with their exponent lowered by 64. The exact path keeps the sign of the residual between the 53-bit result and the exact sum; when the result lands on a midpoint of the subnormal grid it is moved one ulp towards the exact sum before the single final rounding. Normal results are rebuilt by setting the exponent, so only a subnormal result rounds. v_div_fmas_f64 shares the path.