Revision of 1.3.3 Procedures as General Methods from 30 June 2009 - 8:11pm

The revisions let you track differences between multiple versions of a post.

Printer-friendly versionPrinter-friendly version

Exercises

Exercise 1.35

Show that the golden ratio φ (section 1.2.2) is a fixed point of the transformation x → 1 + 1/x, and use this fact to compute φ by means of the fixed-point procedure.

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 xx = 1000 by finding a fixed point of xlog(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.)

Exercise 1.37

  1. An infinite continued fraction is an expression of the form

    As an example, one can show that the infinite continued fraction expansion with the Ni and the Di all equal to 1 produces 1/φ, where φ is the golden ratio (described in section 1.2.2). One way to approximate an infinite continued fraction is to truncate the expansion after a given number of terms. Such a truncation — a so-called k-term finite continued fraction — has the form

    Suppose that n and d are procedures of one argument (the term index i) that return the Ni and Di of the terms of the continued fraction. Define a procedure cont-frac such that evaluating (cont-frac n d k) computes the value of the k-term finite continued fraction. Check your procedure by approximating 1/φ using

    (cont-frac (lambda (i) 1.0)
               (lambda (i) 1.0)
               k)

    for successive values of k. How large must you make k in order to get an approximation that is accurate to 4 decimal places?

  2. If your cont-frac procedure generates a recursive process, write one that generates an iterative process. If it generates an iterative process, write one that generates a recursive process.

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 Ni are all 1, and the Di 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.

Exercise 1.39

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

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.

Comments

zpPtStHVBIJWtlSFeek

I could read a book about this wioutht finding such real-world approaches!

1.3.3 Procedures as General Methods | SICP in Clojure

http://www.rateamateapp.com

http://www.zmbgc.com/sm/thread-946020-1-1.html http://www.cpu520.com/read.php?tid=81427&ds=1 http://www.52jiaoxue.com/bbs/forum.php?mod=viewthread&tid=193447 http://0595.315.cm/thread-352320-1-1.html http://url.ylmov.com/forum.php?mod=viewthread&tid=497273&fromuid=46778 http://www.lhedu.net/bbs/read.php?tid-546125.html http://www.zqgs5188.com/forum.php?mod=viewthread&tid=626630 http://rangdecolours.com/node/49521 http://wiki.iproj.org/index.php?title=User:Hytlazkx#http:.2F.2Fwww.naec…. http://brchinese.com/forum.php?mod=viewthread&tid=214439 http://old.moto8.com/old/Review.asp?NewsID=1287 http://cwc.hlbrc.cn/Review.asp?NewsID=853 http://www.mtbyw.com/forum.php?mod=viewthread&tid=93108&fromuid=6409 http://www.qzmuseum.net/Review.asp?NewsID=139 http://qzmuseum.net/Review.asp?NewsID=139 http://maxxyme.free.fr/wiki/index.php?title=User:Cbxoyz9n#www.bihardiary… http://shamanita.org/wiki/index.php?title=User:I4ufwdck#http:.2F.2Fwww.e… http://www.qjqj.net/forum.php?mod=viewthread&tid=130574&fromuid=6042 http://inclusionwsuv.org/wiki/User:Ahgqyzf8#http:.2F.2Fwww.ihcc.sa.2Find… http://www.yxqnlxx.cn/Review.asp?NewsID=464 http://jingliansi.w204.mc-test.com/thread-140624-1-1.html http://www.zhongbanggongju.com/bbs/forum.php?mod=viewthread&tid=1554943 http://wanhaidao.com/index.php?title=User:Fgiqenl5#www.medhomealert.com…. http://360moneng.com/forum.php?mod=viewthread&tid=455993 http://www.gelou520.com/thread-672144-1-1.html http://winged-justice.com/wiki/User:K60sqof4#www.roc-tech.com.2Findex.as… http://www.hpv99.net/bbs/thread-1526387-1-1.html http://www.jzlsw.com/Review.asp?NewsID=1144 http://dallaslibrary2.org/wiki/index.php?title=User:Hcor8lny#www.sundayc… http://www.mcctv.com.cn/bbs/showtopic-200953.aspx http://bbs.ntwmall.com/forum.php?mod=viewthread&tid=3775632 http://www.rad3d.ca/plastic/index.php?title=User:Jhqp52xg#http:.2F.2Fwww… http://www.dtstudyclub.com/index.php?do=/blog/add/ http://qichexh.com/bbs/forum.php?mod=viewthread&tid=336020 http://hakerville.com/index.php?do=/blog/66377/www-loescher-it-index-asp… http://www.cinec.ca/network/forum.php?mod=viewthread&tid=98677 http://bbs4.zgyanshi.com/forum.php?mod=viewthread&tid=97194 http://www.nss184xx.com/Review.asp?NewsID=489 http://bbs.easy8.cc/thread-295197-1-1.html http://www.china-gutian.com/bbs/forum.php?mod=viewthread&tid=1854302 http://eredar.com.idserver-3.yunhosting.net/bbs/forum.php?mod=viewthread… http://www.hotliao.com/forum.php?mod=viewthread&tid=958986 http://www.xiangfanbbs.com/forum.php?mod=viewthread&tid=518620 http://oox766.g8.namepu.com/thread-604880-1-1.html http://www.caixinxian.com/forum.php?mod=viewthread&tid=319202 http://liu897.com/read.php?tid=65127 http://www.cncuu.cn/forum.php?mod=viewthread&tid=237877 http://www.moushi.cc/forum.php?mod=viewthread&tid=3834129 http://bbs.91youke.com/thread-910969-1-1.html http://www.n3368.com/thread-979424-1-1.html http://simotaoussi.com/index.php?do=/blog/190413/http-www-loescher-it-in… http://5941go.com/forum.php?mod=viewthread&tid=2218644 http://www.9tuan8.com/bbs/forum.php?mod=viewthread&tid=2298592 http://www.tsfgj.cn/Review.asp?NewsID=1882 http://bbs.m.1799.com/forum.php?mod=viewthread&tid=613662&fromuid=366245 http://hbyly.sfsly.com/bbs/forum.php?mod=viewthread&tid=390350 http://www.gz-12.com/forum.php?mod=viewthread&tid=1165757 http://www.ooxxxxoo.com/forum.php?mod=viewthread&tid=2776778 http://sanfuyuqi.com/bbs/forum.php?mod=viewthread&tid=695381 http://demo.bee.com.my/discuzx/forum.php?mod=viewthread&tid=670621 http://bbs.lybyjj.com/forum.php?mod=viewthread&tid=1658393 http://www.qjqj.net/forum.php?mod=viewthread&tid=130590&fromuid=6046 http://xinliweishi.118207.84g.com/forum.php?mod=viewthread&tid=1295678 http://bbs.chuangfe.com/forum.php?mod=viewthread&tid=904945 http://ev-evu.org/forum.php?mod=viewthread&tid=933822 http://www.ggfabu.com/thread-9954456-1-1.html http://cluo.cn/forum.php?mod=forumdisplay&fid=39&filter=typeid&typeid=1 http://www.gzchlz.com/bbs/forum.php?mod=viewthread&tid=349983 http://www.8080xs.com/forum.php?mod=viewthread&tid=106457 http://bimeido.lolipop.jp/luntan/forum.php?mod=viewthread&tid=601792
http://www.rateamateapp.com http://www.rateamateapp.com

iso certifications india

Nice post, I bookmark your blog because I found very good information on your blog, Thanks for sharing more information
Quality Services & Training Pvt.Ltd.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre> <hr> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.
  • Adds typographic refinements.

More information about formatting options