By adapting Euclid's algorithm, and integers a; b lying between 1 and 1000
such that their quotient a/b agrees with the constant pi up
to 6 decimal places (3.14159265)
Any help with be much appreciated!
Hello, mx-!
I don't see how to "adapt Euclid algorithm",
. . but there is a continued fraction approach.
By adapting Euclid's algorithm, find integers $\displaystyle a, b$ between 1 and 1000 such that
their quotient $\displaystyle \frac{a}{b}$ agrees with the constant $\displaystyle \pi$ up to 6 decimal places (3.14159265)
. . $\displaystyle \pi \;=\;3.14159262654 \;= \;3 + 0.141592654$
. . . .$\displaystyle = \;3 + \frac{1}{7.062513306} \;=\;3 + \frac{1}{7 + 0.62513306} $
. . . .$\displaystyle = \;3 + \frac{1}{7 + \dfrac{1}{15.99659441}} \;\approx\;3 + \frac{1}{7 + \frac{1}{16}}$
Therefore: .$\displaystyle \pi \;\approx\:3 + \frac{1}{7 + \frac{1}{16}} \;=\; 3 + \frac{1}{\frac{113}{16}} \;=\;3 + \frac{16}{113} \;=\;\frac{355}{113} $
. . $\displaystyle \begin{array}{ccc}\dfrac{355}{113} &=& {\color{blue}3.141592}92... \\ \\[-3mm]
\pi &=& {\color{blue}3.141592}65...\end{array}$
This is the only solution to this problem.