2 ms·
no. You can accurately represent anything which is k*2^n, where (k,n) are integers. Simple example: 3 is not 2^n but obviously expressing 3 as a floating poi
by dnautics 11y ago
no. You can accurately represent anything which is k*2^n, where (k,n) are integers. Simple example: 3 is not 2^n but obviously expressing 3 as a floating point is not a problem. Similarly 1.5, etc.
In this fashion, primes p seem "better" as they increase, because for a given size limits on k and n, you get more 'numbers' per unit space on the real line. Composite numbers are 'even better', but there are a lot of pains in the ass with composite numbers, stemming from Z/nZ not being a field if n not prime.
Ultimately, though, your internal representation is binary, using anything not two produces other inefficiency. That's why IEEE 754 BCD is not base-10 but base-1000 (since 2^10 = 1024 which is the closest a power of two gets to a power of 10, for bit-wise representation efficiency). We don't have bi-quinary computers.
- deleted 11y ago[deleted]
- Terr_ 11y agoOnce you know you can accurately represent (1/y) in a given base, you've established do not need an infinite number of digits to the right of the radix-point no matter how many times you multiply it by an integer. In fact, I think it exemplifies the upper bound for the number of digits you'd need for "related fractions". For example, we know "one eighth" is expressible in decimal as 0.125. Even if you pick a really big N value, N * (1/8) should never need more than three digits to the right of the decimal point.