Warning
This post was published 36 days ago. The information described in this article may have changed.
There was already topics about FPU in the forum, but don't explain this.
based on the gdb's command ìnfo floatthe float precision is 80bits because the x86 64bits FPU is f80 but in rust max float is f64, in c for instance there is
long double`
pub fn main() {
assert_eq!(3.141592653589793239, // 80bit
3.141592653589793); // 64bit
println!("true");
}
rustc test.rs
./test
true
I think there is no pure rust solution, using `rug::Float;` would be binded `c`
Is it possible to use the x86-64 FPU's float?
6 posts - 3 participants
🏷️ rust_feed