内容 1.3 Formulating Abstractions with Higher-Order Procedures · 60
练习 自检推理
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.
练习 1.38:1737 年,瑞士数学家莱昂哈德·欧拉发表了论文《De Fractionibus Continuis》,其中给出了 e − 2 的连分式展开,其中 e 是自然对数的底数。在这个分式中,所有 Nᵢ 均为 1,Dᵢ 依次为 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, …。编写一个程序,利用练习 1.37 中的 cont-frac 过程,基于欧拉展开近似计算 e 的值。
我的笔记 自动保存