Description
I've run across an upcoming difference in float-related functions such as floor, trunc, ceil, etc, using a beta compiler on x86_64-unknown-linux-gnu
relative to the stable compiler. Bisection points to rust-lang/compiler-builtins#763 as the regression point so while it seems that changing sources for the function implementations I wanted to confirm that it's expected that a behavior change was desired here as well.
One example change is specifically this program:
fn main() {
println!("{:#x}", f32::from_bits(0xffa00000).floor().to_bits());
}
currently prints 0xffe00000
while the beta compiler prints 0xffa00000
.
This was discovered through running the WebAssembly test suite in Wasmtime using a beta/nightly compiler instead of a stable compiler, and previously some functions were "just" the_float.floor()
where now we need NaN checks around them as well. Not a huge issue for us and we're happy to work around it, but I wanted to flag this behavior nonetheless to ensure it's intended.
If this is indeed an intended behavior change (which personally I think is totally fine), I'm happy to close this.
cc @tgross35 for the relevance to rust-lang/compiler-builtins#763