灯下 登录
计算机科学 / SICP / 1.3.3 Procedures as General Methods

Exercise 1.39 · 习题

Exercise 1.39: A continued fraction
representation of the tangent function was published in 1770 by the German
mathematician J.H. Lambert:

tan

x

=

x

1

x
2

3

x
2

5

,

where x is in radians. Define a procedure (tan-cf x k) that

computes an approximation to the tangent function based on Lambert’s formula.

k specifies the number of terms to compute, as in Exercise 1.37.

练习 1.39:1770 年,德国数学家 J.H. 朗伯特发表了正切函数的连分式表示:

tan x = x / (1 − x² / (3 − x² / (5 − …)))

其中 x 以弧度为单位。定义过程 (tan-cf x k),基于朗伯特公式计算正切函数的近似值。k 指定计算的项数,与练习 1.37 相同。