▲ | Someone 3 days ago | |
> that has to mean they are good enough for all practical purposes, right? For practical purposes, they’re bad. Denominators tend to explode when you do a few operations (for example 11/123 + 3/17 = 556/2091), and it’s not easy to spot whether you can simplify results. 12/123 + 3/17 = 191/697, for example. You can counteract things by ‘rounding’ to fractions with denominators below a given limit (say 1000) but then, you likely are better of with reckoning with a fixed denominator that you then do not have to store with each number, allowing you to increase the maximal denominator. For example (https://en.wikipedia.org/wiki/Farey_sequence), there are 965 rational fractions in [0,1] with denominator at most 10 (https://oeis.org/A005728/list), so storing one requires just under 10 bits. If you use the fractions n/964 for 0 ≤ n ≤ 964 as your representable numbers, arithmetic becomes easier. |