Open rlwhitcomb opened 6 months ago
Here's another good (simple to understand) article: https://pi.math.cornell.edu/~gautam/ContinuedFractions.pdf
Suggest a new ContinuedFraction object with expected contents. "inverse()" is a simple method (see the paper) for rational.
Good correspondence between ContinuedFraction and BigFraction (interchangeable values, etc.)
See here: https://en.wikipedia.org/wiki/Continued_fraction and here: https://www.johndcook.com/blog/2013/01/30/rational-approximations-to-e/
And for pi here: https://oeis.org/A001203
We can use the general function to compute both pi and e and phi and other things (arctan ?) both to rational approximations as well as their decimal expansions to arbitrary places ....
We could even allow the continued fraction notation as in
[a0; a1, a2, a3...]
(where the first comma position is a semicolon instead) as a new data type.