I’ve been using 0.15 for my current project, but I’m considering upgrading to 0.17. One thing I remember reading in the 0.16 release notes was that some of the rules regarding float/int coercion were relaxed. Currently my code is littered with @as() and @floatFromInt() conversions, and I’m looking forward to cleaning it up.
However, I’m assuming the compiler doesn’t complain about unnecessary conversions. So is there any way to identify when a conversion is no longer needed, aside from bruce force “delete them all and see what breaks”?
As far as I rememner, The only case that was relaxed is when an integer can be converted into float without loss of precision. For f32, that happens when the absolute value of the integer has fewer than 22 bits, so smaller than u22 and i23.