How to find the terms of the continued fraction representation for $e^\pi$

74 Views Asked by At

The question is - Find the first ten terms of the continued fraction representation for $e^ \pi $

1

There are 1 best solutions below

0
On BEST ANSWER

Algorithm:

Set $r_0$ to be your desired real number, in this case $\displaystyle e^\pi$.

Now, for $i=0,1,2,3,\ldots$, do the following steps:

Set $c_i=\lfloor r_i\rfloor$. This is the floor function.
Set $r_{i+1}=\frac{1}{r_i-c_i}$.

Your desired continued fraction is now $[c_0;c_1,c_2,c_3,\ldots]$.