On Continued Fractions - Part 1

Approximation & Metric

Approximating irrational numbers with rationals goes quite a long back. The first major result on the topic is that for any irrational \(x\), there are infinitely many distinct rationals \(n/d\) such that: $$ |x - n/d| \lt 1/d^2 $$ The second major result is that the right hand side can be improved by a factor of \(M(x)\), the Markov constant of \(x\). The topic gets more amazing as the values \(M(x)\) can take is sophisticated.

So inspired from above, given a rational \(n/d\) and an irrational \(x\) we will define an error metric: $$ cf\_error(x, n/d) = (d x - n)d $$ Only when \(n/d\) is a competitive approximation to \(x\), this metric will be less than \(1/\sqrt 5\) in absolute value. It decouples quality of approximation from denominator magnitude.

Continued Fractions

Convergents of simple continued fraction of \(x\) are all competitive approximations to \(x\).

When experimenting with generalized continued fractions that

  • have fixed partial numerators
  • allow negative integers (that is, also utilize nearest integer function)
  • are pretty good in the above metric
We came across these: $$ {\large e = 3 +{2 \over -7 +{2 \over -20 +{2 \over -14 +{2 \over -36 +{2 \over -22 +{2 \over -52 +{2 \over -30 +{2 \over -68 +{2 \over -38 +...}}}}}}}}} } $$ All convergents of this with \(k \ge 8\) terms (\(-30\) and beyond) seem to be better (in the above metric) than any convergent with \(k\) terms of any continued fractions (including simple) that we have tested with. $$ {\large e^2 = 7 +{2 \over 5 +{2 \over 14 +{2 \over 9 +{2 \over 22 +{2 \over 13 +{2 \over 30 +{2 \over 17 +{2 \over 38 +{2 \over 21 +...}}}}}}}}} } $$ Most convergents of this with \(k \ge 9\) terms (\(38\) and beyond) seem to be better (in the above metric) than any convergent with \(k\) terms of any continued fractions (including simple) that we have tested with. $$ {\large \sqrt{e} = 2 +{1 \over -3 +{1 \over 7 +{1 \over -2 +{1 \over -10 +{1 \over 2 +{1 \over 14 +{1 \over -2 +{1 \over -18 +{1 \over 2 +...}}}}}}}}} } $$ Most convergents of this with \(k \ge 6\) terms (second \(2\) and beyond) seem to be better (in the above metric) than any convergent with \(k\) terms of any continued fractions (including simple) that we have tested with.

No comments:

Post a Comment