Consider the following program:
use num::Num;
fn main() {
let y = "2.89".parse::<f64>();
println!("{:?}", y);
let x = f64::from_str_radix("2.89", 10);
println!("{:?}", x);
}
It prints:
Ok(2.89)
Ok(2.8899999999999997)
Am I missing anything here or results should be equal?
Consider the following program:
It prints:
Am I missing anything here or results should be equal?