You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Encoding any negative number with to_str_radix does not produce the correct result when decoding with from_str_radix since (my guess) #18536.
use std::f32::{from_str_hex, to_str_hex};
use std::num::from_str_radix;
fn main() {
let x = -1.0f32;
let h = to_str_hex(x);
println!("hex = {}", h);
assert_eq!(from_str_radix::<f32>(h.as_slice(), 16).unwrap(), x);
}
The text was updated successfully, but these errors were encountered:
Encoding any negative number with
to_str_radix
does not produce the correct result when decoding withfrom_str_radix
since (my guess) #18536.The text was updated successfully, but these errors were encountered: