Chat (Lingr.com)
Informaiton
Daily
Column
- MySQL日本語の旅(5/1)
- アクセス向上秘伝(5/9)
- 一風変ったHaskellλ門(6/13)
- SICP Answer Book (5/31) 問題3.26追加
Zope Solution
Extra
アーカイブ
OSS案内所
Site Info
関連リンク
##(link2sicp "book-Z-H-12.html#%_thm_1.39" "Exercise 1.39")
解答例
(define (tan-cf x k)
(let ((xtanx (cont-frac (lambda (i) (* -1 (* x x)))
(lambda (i) (- (* 2 i) 1))
k)))
(* -1 (/ xtanx x))))
実行例
gosh> (use math.const) (#<module math.const> #<module gauche.interactive>) gosh> (tan-cf (/ pi 4) 7) 1.0000000000000282 gosh> (tan-cf (/ pi 4) 8) 1.0
コード
##(sicp-answer-code "ex-1.39.scm")