3 ms·
IIRc, 23-bit ints are a subset of float32, and up to 50-something-bit ints are a subset of float64s, so on most architectures, int (32) is a subset of double (6
by BenFrantzDale 4y ago
IIRc, 23-bit ints are a subset of float32, and up to 50-something-bit ints are a subset of float64s, so on most architectures, int (32) is a subset of double (64).
- estebank 4y agoThis is the reason that i32/u32/i16/u16/i8/u8 can be infallibly converted to f64 using the From/Into traits[1]. [1]: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=68793853e823d2dc31f648d3f6b9c4d5 https://play.rust-lang.org/?version=stable&mode=debug&editio...