Files
rust/library/coretests
Jonathan Brouwer 80f74433db Rollup merge of #161522 - folkertdev:gcc-fma16-correctly-rounded, r=tgross35
test `f16::mul_add` not double-rounding the result

test the precision of `f16::mul_add`. The semantics of `mul_add` are that there should only be one rounding of the final result back into the storage type, i.e. the intermediate result of the multiplication should not be rounded.

A naive implementation of `f16::mul_add` as `f32::mul_add(a as f32, b as f32, c as f32) as f16` has insufficient precision, see https://github.com/llvm/llvm-project/issues/98389.

Our `rustc_codegen_gcc` backend still used the `f32` approach, this PR changes it to instead (implicitly) use the fallback body from `core`, which uses `f64::mul_add` so that the result is correctly rounded.
2026-08-25 18:00:08 +02:00
..
…