On wasm32
, half
operation results aren't correctly rounded between each operation
#96437
Labels
wasm32
, half
operation results aren't correctly rounded between each operation
#96437
The following IR (compiler explorer):
Is compiled into the following WASM:
callf
should return positive infinity (0xH7C00
), but on WASM it will return0xH7BFF
due to the extra range of thef32
used to store the intermediate result.This Rust program, when compiled with
rustc 1.81.0-nightly (3cb521a43 2024-06-22)
withrustc --target wasm32-wasip1 code.rs
and run withwasmtime
, demonstrates the issue.The assertion should succeed, but on WASM it fails.
The text was updated successfully, but these errors were encountered: