Closed
Description
Our CI started to report an error today with nightly on Linux (other platforms are fine).
Simplified the test case is because of a small difference in the computation of log
.
(I know it's bad practice to do equality tests on float, but I thought I'd report this behavior change anyway as i don't know if this was intentional).
Code
I tried this code:
fn main() {
println!("Hello, world! {}", 9f64.log(3.) );
assert_eq!(9f64.log(3.) , 2.)
}
I expected to see this happen:
Hello, world! 2
and no panics. As this happens in stable
Instead, this happened:
Hello, world! 2.0000000000000004
thread 'main' panicked at src/main.rs:3:5:
assertion `left == right` failed
left: 2.0000000000000004
right: 2.0
Version with regression
rustc 1.82.0-nightly (612a33f 2024-07-29)
(Linux only)