Swift Numerics and integers

Tangential to your point, but neither of these subset relations holds in Swift, nor does Float ⊇ Int32. Int32 can represent values that are not representable as Float (e.g. 0xffff_ffff; the closest representable Float value is 0x1_0000_0000), and Int is equivalent to Int32 on 32b platforms, so cannot necessarily represent all Int64 values.

6 Likes