3 ms·
> this happens in the hardware floating point Not really. It's a limitation of the IEEE floating point format used in most programming languages. Some numbers
by rbanffy 1y ago
> this happens in the hardware floating point
Not really. It's a limitation of the IEEE floating point format used in most programming languages. Some numbers that look nice in base 10 don't have an exact representation in base 2.
- shagie 1y agoRational numbers where the denominator is a multiple of the prime factors of the base have an exact fractional representation in that base. 1/3 doesn't have an exact representation in base 10 or base 2. 1/5th does have an exact representation in base 10 (0.2), but doesn't in base 2. 1/4th has an exact representation in base 10 (0.25) and in base 2 (0.01)