; ====================================================================== ; ; Structure and Interpretation of Computer Programs ; (trial answer to excercises) ; ; 计算机程序的构造和解释(习题试解) ; ; created: code17 03/06/05 ; modified: ; (保持内容完整不变前提下,可以任意转载) ; ======================================================================
;; SICP No.1.35 ;; 本题为理解题
;; [phi]是方程x^2=x+1的一个根。 ;; 方程两边同时除以x得,x=1+1/x。设f(x)=1+1/x,f(x)=x ;; 求x即为求x|->1+1/x的不动点
;; Test-it;; ;; Welcome to MzScheme version 209, Copyright (c) 2004 PLT Scheme, Inc. ;; > (fixed-point (lambda (x) (+ 1 (/ 1 x))) 1.0) ;; 1.6180327868852458

|