4 ms·
I haven't seen it yet... what's with that final four (common to all languages)?
by mrcactu5 10y ago
I haven't seen it yet... what's with that final four (common to all languages)?
- nitrogen 10y agoFloats 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.