by ketzu · 4y ago · 0 comments
The only sentence I don't really like:
> When you have a base-10 system (like ours), it can only express fractions that use a prime factor of the base.
It's a weird mix of over- and under-generalization. The second half sounds like a feature of all number systems independent of the base, and we can express more numbers (just with a notion of 'repeating infinitely' or as fractions), that's why they even switch to "expressed cleanly" in the next sentence.
If I get more sleep and can think of a good way to express it, maybe I'll actually make a pull request ;)
IMO it could do better to explain why this is the case rather than state it as a fact, as it’s not immediately obviously true (at least to me).
A terminating decimal is equivalent to a fraction with a denominator that is a power of 10. Any fraction with a denominator that is a product of prime factors of 10 can be turned into a fraction with a denominator that is a power of 10. Thus the only fractions with terminating decimal representations are those with denominators which are a product of prime factors of 10.
Of course this is true for any base other than 10, but I couldn’t think of a term for “terminating decimal” with other bases.
> Any fraction with a denominator that is a product of prime factors of 10 can be turned into a fraction with a denominator that is a power of 10.
isn’t sufficient. You also have to argue that any fraction with a denominator that is not a product of the prime factors of 10 cannot be written as a finite decimal.
If you do that you end up with a tautology.
A better and more rigid explanation would start with a rational p/q, with p and q relatively prime that can be written as some integer divided by 10^n, and reason from there.
You almost gave a really good explanation yourself on why this should be the case but stopped short of it. Don't know why. Any terminating decimal can be written in the form a/10^{n} where a and n are both integers. After we have our p/q, there exists an integer c such that p/q · c/c = p/10^{n} if and only if q consists solely of the primes 2 or 5 (or both). And if not, then there isn't an integer c to satisfy said condition, thus making it impossible to write our p/q in the form of a/10^{n} (white still keeping the numerator an integer at least) so it's an infinitely repeating decimal.
I imagine you could create a table of the fractions 1/2, 1/3, ..., 1/10; prime factorization (e.g. 1/4 = 1/2 * 1/2), their decimal representation, their binary representation, and maybe for familiarity the sum-of-fractions represented by the binary representation. e.g. 0.101 meaning 1/2 + 1/8.