Hacker News new | ask | show | jobs
by derriz 360 days ago
I do not consider it safe.

The float representation of 0.3 (e.g.) does not, when cast to double, represent 0.3 - in contrast the i32 representation of any number when cast to i64 represents the same number.