What CFs are particularly good at
– representing irrational numbers, in a way independent of a particular base.
– approximating irrational numbers, finding the best approximating fraction.
What they are not good at
– being added and multiplied. That is very complicated. Although possible, and maybe fine for computers.
Gosper’s batting average problem
Q. If a baseball player’s batting average is 0.334, what’s the smallest number of at-bats they could have? (batting average = number of hits/at-bats)
0.334 corresponds to an actual average in the range 0.3335-0.3345. The CFs for these values are
This implies that the “simplest” number within the range is
The Elementary Arithmetic Operators of Continued Fraction.pdf