Rust:
fn main() {
let a: f32 = 1e7 + 0.5 + 0.5;
let b: f32 = 1e7f32 + 0.5f32 + 0.5f32;
println!("{}", a==c); // true
}
C: #include <stdio.h>
int main() {
float a = 1e7 + 0.5 + 0.5;
float b = 1e7f + 0.5f + 0.5f;
printf("%s\n", a==b ? "true" : "false"); // false
}
That's awesome. I'm totally fine with an annoying suffix like f32 if I never actually need to use it. While f might be a nicer suffice than f32, no suffix is even better.