Today I learned some things that make me upset, in Rust:

* If you divide by zero with floats, they will return `inf` and not panic
* If you `as` cast an `inf` float to `i32`, it will return i32::MAX

Probably totally reasonable choices in isolation + practice, but WHEW was that fun to find.

Comments