2 ms·
Binary floating points are not for system level programming; they are for scientific programming, where the accuracy of the values is related to the magnitude o
by aidenn0 8y ago
Binary floating points are not for system level programming; they are for scientific programming, where the accuracy of the values is related to the magnitude of the values.
64 bit integers are actually good for a lot of things that floating point gets used for; coordinates already should never have been floating point (the accuracy of measurement is independent of the magnitude for coordinates), but you could represent the entire solar system in millimeters without overflowing 64 bit integers (compared to not even the entire earth in mm for 32 bit integers).
Also, it's popular to blame javascript for all today's problems, but the double-precision floating point is the only number type it has, which has some effect on its use.