assert!(0.1 + 0.2 == 0.3)
leads to a panic
while
assert!(0.1_f32 + 0.2_f32 == 0.3_f32)
will proceed without any issues
So, an actual implementation shows
0.1 + 0.2 = 0.30000000000000004
Therefore, the following will NOT work
assert!(0.1_f64 + 0.2_f64 == 0.3_f64)
But this will
assert!(0.1_f64 + 0.2_f64 != 0.3_f64)
I think a good chunk of people have heard of this problem before, but it's always nice to have a brain teaser. Hope I spelled that right.