Decimal to fraction converter
© 2012 Jay B Krasner, MD, FACP
Algorithm from :
Teknomo, Kardi. Continued Fraction. http://people.revoledu.com/kardi/tutorial/ContinuedFraction/index.html
Enter decimal for conversion:
Significant digits:
2
3
4
5
6
7
8
9
10
Converts to
???/???
Elapsed time:
k
a
k
= ⌊y
k-1
⌋
r
k
= y
k-1
- a
k
y
k
= 1/r
k
p
k
= a
k
p
k-1
+ p
k-2
q
k
= a
k
q
k-1
+ q
k-2
p/q
x - p/q
-1
-
-
x
1
0
-
-