| k |
xk |
yk |
rk |
qk |
Error=
xk/yk-0.69231 |
Remarks |
| 1 |
1 |
0 |
1 |
|
|
First set up the table with the 1's and the
0's as shown. r1 is the larger of 1 and
the decimal. r2 is the smaller. |
| 2 |
0 |
1 |
0.69231 |
1 |
|
Compute
q2=floor(r1/r2).
Continue to do this, using the appropriate q's and
r's until the remainder is zero, or the accuracy is
sufficient.
Compute:
x3=x1-q·x2=1, and
y3=y3=y1-q·y2=-1 |
| 3 |
1 |
-1 |
0.30769 |
2 |
0.30769 |
Continue computing the x's and the y's |
| 4 |
-2 |
3 |
0.07693 |
3 |
0.02564 |
|
| 5 |
7 |
10 |
0.0769 |
1 |
0.00769 |
|
| 6 |
-9 |
13 |
0.00003 |
2563 |
0.000002 |
At this point we have a decimal approximation that is
accuracy to five figures. Because we might expect 0.69231
to be accurate within +/-0.000005, this may be the
optimal answer. (Actually, this is the fraction I rounded
to produce the starting decimal, and the remainder here
is a rounding error). |
| 7 |
-23074 |
33329 |
0.00001 |
3 |
0.0000000003 |
With greater accuracy, we have a large
denominator. Going this far assumes that the initial
decimal is actually 0.692310000 |
| 8 |
69231 |
-100000 |
0 |
- |
0 |
The x's and y's are expressed as a decimal
fraction, the same as 0.69231. This occurs when
gcd=1 |