Using Maple for continued fraction expansions

639 Views Asked by At

I can find the continued fraction expansion of a value using Maple. Is there a simple way for finding the sequence of convergents (approximants) of the continued fraction expansion in Maple? Currently I successively truncate the continued fraction expansions to develop the convergents but this is time consuming. Any suggestions for making it quicker? Maybe other mathematics packages can do it better than Maple, but I don't know

1

There are 1 best solutions below

0
On
> with(numtheory):
> cfrac(Pi,3,cvgts):
> cvgts;
                        333  355
              [3, 22/7, ---, ---, ...]
                        106  113

or:

> with(numtheory):
> cfrac([3,7,15,1]);
                        355
                        ---
                        113