2 ms·
Floats can only represent fractions of powers of two. 0.3 is a fraction of powers of two and five. See IEEE754 https://en.m.wikipedia.org/wiki/IEEE_floating_
by nitrogen 10y ago
Floats can only represent fractions of powers of two. 0.3 is a fraction of powers of two and five.
See IEEE754
https://en.m.wikipedia.org/wiki/IEEE_floating_point https://en.m.wikipedia.org/wiki/IEEE_floating_point
https://en.m.wikipedia.org/wiki/IEEE_754-1985 https://en.m.wikipedia.org/wiki/IEEE_754-1985
- mmarx 10y ago> See IEEE754 Only in the original 1985 version, however: IEEE 754-2008 actually specifies decimal floating point types; decimal arithmetic was already specified in IEEE 854-1987. Of course, the default representation is almost always one of the binary formats, but that is no longer the only option.