Mathematica has the ContinuedFraction[] function to give the continued fraction expansion of a rational (or approximation of a real) number. I'm interested in the inverse: is there an efficient way to give an array as a continued fraction expansion and have Mathematica calculate the number it represents?
Tell me more
×
Mathematica Stack Exchange is a question and answer site for
users of Mathematica. It's 100% free, no registration required.
|
|
||||
|
As Heike mentions in the comments,
If
or even
or equivalently
Still another alternative is
|
||||
|
|

ContinuedFractionref page would have given you links toFromContinuedFractionand the overview page "Continued Fractions & Rational Approximations". The tutorial, also mentioned on the same page, contains a discussion ofFromContinuedFractionas well. – Sjoerd C. de Vries Jun 24 '12 at 15:53