The dfc2f command transforms a continued fraction into a real number.
| dfc2f([1,2,[2]]) |
|
After simplification with normal, we obtain √2.
| dfc2f([1,2,3]) |
|
| normal(dfc2f([3,3,6,[3,6]])) |
|
| dfc2f([1,2,3,4,5,6,7]) |
|
Input to verify:
| 1+1/(2+1/(3+1/(4+1/(5+1/(6+1/7))))) |
|
| dfc2f([1,2,3,4,5,43/7]) |
|
Input to verify:
| 1+1/(2+1/(3+1/(4+1/(5+7/43)))) |
|