Sujet : Re: evolution of bytes, The joy of FORTRAN
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : alt.folklore.computers comp.os.linux.miscDate : 04. Mar 2025, 00:41:46
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vq5enq$1h3mg$11@dont-email.me>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Pan/0.162 (Pokrosvk)
On Mon, 3 Mar 2025 06:54:31 -0700, Peter Flass wrote:
Some fractions that are exact in decimal are only approximate in binary.
Base-ten has two prime divisors: 2 and 5. Base-two has only 2. So any
fraction that has a denominator that is the product of any integer powers
of those divisors can be represented exactly, while others cannot.
The need to represent 1/3 exactly is also quite common. That’s why I think
the smallest place-system base that can cope with a reasonable range of
fractions is 30 -- it has 2, 3 and 5 as prime divisors, and so can cope
with fraction denominators made up arbitrary products and integer powers
of all of those.