Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

share|improve this question
    
In Mathematica the relevant function is Convergents. Convergents[Pi, 3] gives {3, 22/7, 333/106}. –  Sasha Jan 24 '13 at 5:28

1 Answer 1

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

or:

> with(numtheory):
> cfrac([3,7,15,1]);
                        355
                        ---
                        113
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.