half-rs
half-rs copied to clipboard
Weird formatting behavior
this code:
let x = f16::from_f32(std::f32::consts::PI);
println!("{:.1e}", x);
println!("{:.1e}", f32::from(x));
produces this
3.140625e0
3.1e0
f16::debug
just uses fmt(self.to_f32(), f)
so I don't know what might be causing this