HNHacker News
TopNewBestAskShowJobs

7x11x13

5 karma · joined June 5, 2022

submissionscomments
7x11x13··on Math on GitHub: Following Up
The “opt-in” would make it backwards-compatible, since any preexisting files would have math support disabled.
7x11x13··on Floating Point Math
You're right, my explanation was invalid.
7x11x13··on Floating Point Math
> it can only express fractions that use a prime factor of the base.

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.