You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sicp-all-tasks/sicp/1_002e38

28 lines
500 B

Exercise 1.38: In 1737, the Swiss mathematician
Leonhard Euler published a memoir De Fractionibus Continuis, which
included a continued fraction expansion for
e
2
, where
e
is the base
of the natural logarithms. In this fraction, the
N
i
are all 1, and
the
D
i
are successively 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, ….
Write a program that uses your cont-frac procedure from Exercise 1.37
to approximate
e
, based on Euler’s expansion.