Continued fraction/Arithmetic: Difference between revisions

Content added Content deleted
m (fix links)
Line 12: Line 12:
My description follows [http://perl.plover.com/yak/cftalk/INFO/gosper.txt part of Gosper reproduced on perl.plover.com]. This document is text and unnumbered, you may wish to start by searching for "Addition, Multiplication, etc. of Two Continued Fractions" prior to reading the whole thing.
My description follows [http://perl.plover.com/yak/cftalk/INFO/gosper.txt part of Gosper reproduced on perl.plover.com]. This document is text and unnumbered, you may wish to start by searching for "Addition, Multiplication, etc. of Two Continued Fractions" prior to reading the whole thing.


[http://perl.plover.com/classes/cftalk/TALK/slide001.html perl.plover.com] also includes a series of slides as a class on continued fractions. The example [1;5,2] + 1/2 in [[Continued fraction arithmetic/G(matrix NG, Contined Fraction N) | G(matrix NG, Contined Fraction_N)]] is worked through in this class.
[http://perl.plover.com/classes/cftalk/TALK/slide001.html perl.plover.com] also includes a series of slides as a class on continued fractions. The example [1;5,2] + 1/2 in [[Continued fraction/Arithmetic/G(matrix NG, Contined Fraction N) | G(matrix NG, Contined Fraction_N)]] is worked through in this class.


For these tasks continued fractions will be of the form:
For these tasks continued fractions will be of the form:
Line 18: Line 18:
so each may be described by the notation [<math>a_0 ; a_1, a_2, ..., a_n</math>]
so each may be described by the notation [<math>a_0 ; a_1, a_2, ..., a_n</math>]


==[[Continued fraction arithmetic/Continued fraction r2cf%28Rational N%29]]==
==[[Continued fraction/Arithmetic/Construct from rational number]]==
During these tasks I shall use the function described in this task to create continued fractions from rational numbers.
During these tasks I shall use the function described in this task to create continued fractions from rational numbers.


Line 73: Line 73:
So I can define arithmetic as operations on this matrix which make <math>a_{12}</math>, <math>a_1</math>, <math>a_2</math>, <math>b_{12}</math>, <math>b_1</math>, <math>b_2</math> zero and read the answer from <math>a</math> and <math>b</math>. This is more interesting when <math>N_1</math> and <math>N_2</math> are continued fractions, which is the subject of the following tasks.
So I can define arithmetic as operations on this matrix which make <math>a_{12}</math>, <math>a_1</math>, <math>a_2</math>, <math>b_{12}</math>, <math>b_1</math>, <math>b_2</math> zero and read the answer from <math>a</math> and <math>b</math>. This is more interesting when <math>N_1</math> and <math>N_2</math> are continued fractions, which is the subject of the following tasks.


==[[Continued fraction arithmetic/G(matrix NG, Contined Fraction N) | G(matrix NG, Contined Fraction N)]]==
==[[Continued fraction/Arithmetic/G(matrix NG, Contined Fraction N) | G(matrix NG, Contined Fraction N)]]==
Here we perform basic mathematical operations on a single continued fraction.
Here we perform basic mathematical operations on a single continued fraction.
==[[Continued fraction arithmetic/G(matrix NG, Contined Fraction N1, Contined Fraction N2) | The bivarate solution G(matrix NG, Continued Fraction N<sub>1</sub>, Continued Fraction N<sub>2</sub>)]]==
==[[Continued fraction/Arithmetic/G(matrix NG, Contined Fraction N1, Contined Fraction N2) | The bivarate solution G(matrix NG, Continued Fraction N<sub>1</sub>, Continued Fraction N<sub>2</sub>)]]==
Here we perform basic mathematical operations on two continued fractions.
Here we perform basic mathematical operations on two continued fractions.
* Compare two continued fractions
* Compare two continued fractions