Closed
Description
This is a problem in Rust's compiler-builtins, but also the LLVM library (which is demonstrated here). The correct answer should be 0.0.
extern "C" {
fn __mulsf3(a: f32, b: f32) -> f32;
}
fn main() {
let a = 7.83651e-39f32;
let b = 2.7310085e-8f32;
let res_asm = a * b ;
let res_mulsf3 = unsafe { __mulsf3(a, b) };
println!("asm {} {:#010x}", res_asm, res_asm.to_bits());
println!("mulsf3 {} {:#010x}", res_mulsf3, res_mulsf3.to_bits());
}
asm 0 0x00000000
mulsf3 0.000000000000000000000000000000000000000000001 0x00000001
Metadata
Metadata
Assignees
Labels
No labels