<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6066131393062218776</id><updated>2011-09-29T19:57:46.137-07:00</updated><title type='text'>Jon Aquino's SICP Exercises</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jonaquino4.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jonaquino4.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jonathan</name><uri>http://www.blogger.com/profile/00759347756359490466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-9TQbqrnPvrk/TkxumKgG_4I/AAAAAAAAAcQ/bB1ATSZ-o2s/s220/Jonathan-mail-80x80.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6066131393062218776.post-2904965992609810138</id><published>2008-04-25T00:28:00.000-07:00</published><updated>2008-04-25T00:32:31.082-07:00</updated><title type='text'>Exercise 1.9</title><content type='html'>Iterative.&lt;br /&gt;&lt;br /&gt;Recursive.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6066131393062218776-2904965992609810138?l=jonaquino4.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonaquino4.blogspot.com/feeds/2904965992609810138/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6066131393062218776&amp;postID=2904965992609810138' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/2904965992609810138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/2904965992609810138'/><link rel='alternate' type='text/html' href='http://jonaquino4.blogspot.com/2008/04/exercise-19.html' title='Exercise 1.9'/><author><name>Jonathan</name><uri>http://www.blogger.com/profile/00759347756359490466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-9TQbqrnPvrk/TkxumKgG_4I/AAAAAAAAAcQ/bB1ATSZ-o2s/s220/Jonathan-mail-80x80.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6066131393062218776.post-84473421935244837</id><published>2008-04-23T22:40:00.000-07:00</published><updated>2008-04-23T23:03:36.523-07:00</updated><title type='text'>Exercise 1.7</title><content type='html'>"The good-enough? test used in computing square roots will not be very effective for finding the square roots of very small numbers." If x is much smaller than 0.001, good-enough? will return true for numbers that are significantly off. For example, it will return true if x is 0.000001 and guess is 0.0001, (abs (- (square guess) x)) = 0.00000999... and good-enough? returns true, even though the guess is off by a factor of 100.&lt;br /&gt;&lt;br /&gt;"Also, in real computers, arithmetic operations are almost always performed with limited precision. This makes our test inadequate for very large numbers." Limited precision means that there is a limit to the number of significant figures in our calculations. Suppose the limit is 7 significant figures, x is 10000000000000000000000000000000000000000000000000000 and guess is 100000000000000000001000000. (abs (- (square guess) x)) = 0 and good-enough? returns true, even though guess is off by 1000000.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;(define (good-enough? guess old-guess)&lt;br /&gt;    (&amp;lt; (abs (- guess old-guess)) (* 0.001 guess)))&lt;br /&gt;&lt;br /&gt;(define (sqrt-iter guess x)&lt;br /&gt;    (if (good-enough? guess (improve guess x))&lt;br /&gt;        (improve guess x)&lt;br /&gt;        (sqrt-iter (improve guess x) x)))&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6066131393062218776-84473421935244837?l=jonaquino4.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonaquino4.blogspot.com/feeds/84473421935244837/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6066131393062218776&amp;postID=84473421935244837' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/84473421935244837'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/84473421935244837'/><link rel='alternate' type='text/html' href='http://jonaquino4.blogspot.com/2008/04/exercise-17.html' title='Exercise 1.7'/><author><name>Jonathan</name><uri>http://www.blogger.com/profile/00759347756359490466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-9TQbqrnPvrk/TkxumKgG_4I/AAAAAAAAAcQ/bB1ATSZ-o2s/s220/Jonathan-mail-80x80.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6066131393062218776.post-139987726419866711</id><published>2008-04-23T22:37:00.000-07:00</published><updated>2008-04-23T22:39:57.975-07:00</updated><title type='text'>Exercise 1.6</title><content type='html'>The program will not halt. The first call to new-if will start by evaluating both arguments. But the second argument (the sqrt-iter call) calls new-if, which starts by evaluating both arguments. But again, the second argument (the sqrt-iter call) calls new-if, which starts by evaluating both arguments. And so forth.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6066131393062218776-139987726419866711?l=jonaquino4.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonaquino4.blogspot.com/feeds/139987726419866711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6066131393062218776&amp;postID=139987726419866711' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/139987726419866711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/139987726419866711'/><link rel='alternate' type='text/html' href='http://jonaquino4.blogspot.com/2008/04/exercise-16.html' title='Exercise 1.6'/><author><name>Jonathan</name><uri>http://www.blogger.com/profile/00759347756359490466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-9TQbqrnPvrk/TkxumKgG_4I/AAAAAAAAAcQ/bB1ATSZ-o2s/s220/Jonathan-mail-80x80.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6066131393062218776.post-1074926159466719386</id><published>2008-04-18T22:49:00.000-07:00</published><updated>2008-04-18T22:55:53.480-07:00</updated><title type='text'>Exercise 1.5</title><content type='html'>If the interpreter uses applicative-order evaluation, it will go into an infinite loop when it evaluates the second argument (p). This does (p), which does (p), and so on.&lt;br /&gt;&lt;br /&gt;If the interpreter uses normal-order evaluation, it will not begin by evaluating the second argument.  It executes the test expression with the unevaluated arguments. Because the first argument is 0, the result is 0; the second argument is left unevaluated, and no infinite loop occurs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6066131393062218776-1074926159466719386?l=jonaquino4.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonaquino4.blogspot.com/feeds/1074926159466719386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6066131393062218776&amp;postID=1074926159466719386' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/1074926159466719386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/1074926159466719386'/><link rel='alternate' type='text/html' href='http://jonaquino4.blogspot.com/2008/04/exercise-15.html' title='Exercise 1.5'/><author><name>Jonathan</name><uri>http://www.blogger.com/profile/00759347756359490466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-9TQbqrnPvrk/TkxumKgG_4I/AAAAAAAAAcQ/bB1ATSZ-o2s/s220/Jonathan-mail-80x80.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6066131393062218776.post-4362047734036221593</id><published>2008-04-18T22:46:00.000-07:00</published><updated>2008-04-18T22:48:32.303-07:00</updated><title type='text'>Exercise 1.4</title><content type='html'>If b is greater than 0, the if expression returns +; otherwise it returns -. The resulting operator is used in the outer expression (operator a b). Thus, (- a b) if b is negative; (+ a b) if b is positive.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6066131393062218776-4362047734036221593?l=jonaquino4.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonaquino4.blogspot.com/feeds/4362047734036221593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6066131393062218776&amp;postID=4362047734036221593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/4362047734036221593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/4362047734036221593'/><link rel='alternate' type='text/html' href='http://jonaquino4.blogspot.com/2008/04/exercise-14.html' title='Exercise 1.4'/><author><name>Jonathan</name><uri>http://www.blogger.com/profile/00759347756359490466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-9TQbqrnPvrk/TkxumKgG_4I/AAAAAAAAAcQ/bB1ATSZ-o2s/s220/Jonathan-mail-80x80.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6066131393062218776.post-8771410407614571479</id><published>2008-04-18T22:40:00.000-07:00</published><updated>2008-04-18T22:45:25.335-07:00</updated><title type='text'>Exercise 1.3</title><content type='html'>&lt;span style="font-family:courier new;"&gt;(define (foo a b c)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    (cond &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        ((and (&lt;&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        ((and (&lt;&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        (else (+ (* a a) (* b b))))&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6066131393062218776-8771410407614571479?l=jonaquino4.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonaquino4.blogspot.com/feeds/8771410407614571479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6066131393062218776&amp;postID=8771410407614571479' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/8771410407614571479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/8771410407614571479'/><link rel='alternate' type='text/html' href='http://jonaquino4.blogspot.com/2008/04/exercise-13.html' title='Exercise 1.3'/><author><name>Jonathan</name><uri>http://www.blogger.com/profile/00759347756359490466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-9TQbqrnPvrk/TkxumKgG_4I/AAAAAAAAAcQ/bB1ATSZ-o2s/s220/Jonathan-mail-80x80.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6066131393062218776.post-2965104790262332793</id><published>2008-04-18T22:38:00.000-07:00</published><updated>2008-04-18T22:40:19.274-07:00</updated><title type='text'>Exercise 1.2</title><content type='html'>&lt;span style="font-family:courier new;"&gt;(/ (+ 5 4 (- 2 (- 3 (+ 5 (/ 4 5)))))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    (* 3 (- 6 2) (- 2 7)))&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6066131393062218776-2965104790262332793?l=jonaquino4.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jonaquino4.blogspot.com/feeds/2965104790262332793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6066131393062218776&amp;postID=2965104790262332793' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/2965104790262332793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6066131393062218776/posts/default/2965104790262332793'/><link rel='alternate' type='text/html' href='http://jonaquino4.blogspot.com/2008/04/exercise-12.html' title='Exercise 1.2'/><author><name>Jonathan</name><uri>http://www.blogger.com/profile/00759347756359490466</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-9TQbqrnPvrk/TkxumKgG_4I/AAAAAAAAAcQ/bB1ATSZ-o2s/s220/Jonathan-mail-80x80.jpg'/></author><thr:total>0</thr:total></entry></feed>
