Exponential function
Continued fractions for e

A continued fraction for e can be obtained via an identity of Euler: e x = 1 + x 1 − x x + 2 − 2 x x + 3 − 3 x x + 4 − ⋱ {\displaystyle e^{x}=1+{\cfrac {x}{1-{\cfrac {x}{x+2-{\cfrac {2x}{x+3-{\cfrac {3x}{x+4-\ddots }}}}}}}}}

The following generalized continued fraction for e converges more quickly: e z = 1 + 2 z 2 − z + z 2 6 + z 2 10 + z 2 14 + ⋱ {\displaystyle e^{z}=1+{\cfrac {2z}{2-z+{\cfrac {z^{2}}{6+{\cfrac {z^{2}}{10+{\cfrac {z^{2}}{14+\ddots }}}}}}}}}

or, by applying the substitution z = x / y: e x y = 1 + 2 x 2 y − x + x 2 6 y + x 2 10 y + x 2 14 y + ⋱ {\displaystyle e^{\frac {x}{y}}=1+{\cfrac {2x}{2y-x+{\cfrac {x^{2}}{6y+{\cfrac {x^{2}}{10y+{\cfrac {x^{2}}{14y+\ddots }}}}}}}}} with a special case for z = 2: e 2 = 1 + 4 0 + 2 2 6 + 2 2 10 + 2 2 14 + ⋱ = 7 + 2 5 + 1 7 + 1 9 + 1 11 + ⋱ {\displaystyle e^{2}=1+{\cfrac {4}{0+{\cfrac {2^{2}}{6+{\cfrac {2^{2}}{10+{\cfrac {2^{2}}{14+\ddots \,}}}}}}}}=7+{\cfrac {2}{5+{\cfrac {1}{7+{\cfrac {1}{9+{\cfrac {1}{11+\ddots \,}}}}}}}}}

This formula also converges, though more slowly, for z > 2. For example: e 3 = 1 + 6 − 1 + 3 2 6 + 3 2 10 + 3 2 14 + ⋱ = 13 + 54 7 + 9 14 + 9 18 + 9 22 + ⋱ {\displaystyle e^{3}=1+{\cfrac {6}{-1+{\cfrac {3^{2}}{6+{\cfrac {3^{2}}{10+{\cfrac {3^{2}}{14+\ddots \,}}}}}}}}=13+{\cfrac {54}{7+{\cfrac {9}{14+{\cfrac {9}{18+{\cfrac {9}{22+\ddots \,}}}}}}}}}
combination:two_responses, startend:end_checker, oulipo:avoid_letter[a]