Skip to content

Commit

Permalink
Exercise 1.36
Browse files Browse the repository at this point in the history
  • Loading branch information
zv committed Jan 5, 2019
1 parent 8601286 commit 2489b4b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sicp1.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1170,3 +1170,14 @@ procedure. |#
(define (1.35/find-golden-ratio)
(fixed-point (λ (n) (+ 1 (/ 1 n))) 1))


#| Exercise 1.36
Modify fixed-point so that it prints the sequence of approximations it
generates, using the newline and display primitives shown in Exercise 1.22.
Then find a solution to xⁿ=1000 by finding a fixed point of
x↦log(1000)/log(x). (Use Scheme’s primitive log procedure, which computes
natural logarithms.) Compare the number of steps this takes with and
without average damping. (Note that you cannot start fixed-point with a
guess of 1, as this would cause division by log(1)=0.)
|#

0 comments on commit 2489b4b

Please sign in to comment.