<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: SICP section 2.1.4</title>
	<atom:link href="http://eli.thegreenplace.net/2007/07/27/sicp-section-214/feed/" rel="self" type="application/rss+xml" />
	<link>http://eli.thegreenplace.net/2007/07/27/sicp-section-214/</link>
	<description>Eli Bendersky's personal website</description>
	<pubDate>Fri, 21 Nov 2008 17:55:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: eliben</title>
		<link>http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-133016</link>
		<dc:creator>eliben</dc:creator>
		<pubDate>Tue, 30 Sep 2008 12:31:47 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-133016</guid>
		<description>@gorilych,
I've fixed the typo, thanks.</description>
		<content:encoded><![CDATA[<p>@gorilych,<br />
I&#8217;ve fixed the typo, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gorilych</title>
		<link>http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-133006</link>
		<dc:creator>gorilych</dc:creator>
		<pubDate>Tue, 30 Sep 2008 09:44:46 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-133006</guid>
		<description>Ops. Sorry. It proves. Only one typo:

"if we multiply it by another interval with width 3, say 2,5"

should be

"if we multiply it by another interval with width 1.5, say 2,5"</description>
		<content:encoded><![CDATA[<p>Ops. Sorry. It proves. Only one typo:</p>
<p>&#8220;if we multiply it by another interval with width 3, say 2,5&#8243;</p>
<p>should be</p>
<p>&#8220;if we multiply it by another interval with width 1.5, say 2,5&#8243;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gorilych</title>
		<link>http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-133005</link>
		<dc:creator>gorilych</dc:creator>
		<pubDate>Tue, 30 Sep 2008 09:42:39 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-133005</guid>
		<description>"Now, to prove that this isn’t true for multiplication, consider the interval 2,4 (width = 1). Multiplied by 7,10 (width = 1.5) we get 14,40 (width = 13). Now, if we multiply it by another interval with width 3, say 2,5 we get 4,20 (width = 8). Therefore, the width of the multiplication doesn’t depend only on the widths of the multiplicands."

Well. It proves nothing. Think better.</description>
		<content:encoded><![CDATA[<p>&#8220;Now, to prove that this isn’t true for multiplication, consider the interval 2,4 (width = 1). Multiplied by 7,10 (width = 1.5) we get 14,40 (width = 13). Now, if we multiply it by another interval with width 3, say 2,5 we get 4,20 (width = 8). Therefore, the width of the multiplication doesn’t depend only on the widths of the multiplicands.&#8221;</p>
<p>Well. It proves nothing. Think better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eliben</title>
		<link>http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-124587</link>
		<dc:creator>eliben</dc:creator>
		<pubDate>Fri, 25 Jul 2008 12:12:03 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-124587</guid>
		<description>Wang, you're right - posting fixed code.</description>
		<content:encoded><![CDATA[<p>Wang, you&#8217;re right - posting fixed code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wang Shengyi</title>
		<link>http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-124573</link>
		<dc:creator>Wang Shengyi</dc:creator>
		<pubDate>Fri, 25 Jul 2008 08:39:23 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-124573</guid>
		<description>I don't think Exercise 2.12 is correct. When center is negative and p is positive, the make-center-percent will construct an error interval. Then the result of percent is negative too.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think Exercise 2.12 is correct. When center is negative and p is positive, the make-center-percent will construct an error interval. Then the result of percent is negative too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eliben</title>
		<link>http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-123875</link>
		<dc:creator>eliben</dc:creator>
		<pubDate>Sun, 13 Jul 2008 16:00:49 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-123875</guid>
		<description>Peter,
Thanks for the tip - I added 0 into the range check.</description>
		<content:encoded><![CDATA[<p>Peter,<br />
Thanks for the tip - I added 0 into the range check.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Michaux</title>
		<link>http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-123738</link>
		<dc:creator>Peter Michaux</dc:creator>
		<pubDate>Fri, 11 Jul 2008 05:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-123738</guid>
		<description>I think that Exercise 2.10 is still not correct. For example, the following passes the current conditional check suggested by David Clark, yet this causes a divide by zero error.

(div-interval (make-interval 1 2) (make-interval 0 1))

I used the following helper predicate in my code

(define (contains-zero? interval)
&#160;&#160;(and (&#60;= (lower-bound interval) 0)
&#160;&#160;&#160;&#160;&#160;&#160;&#160;(&#62;= (upper-bound interval) 0)))</description>
		<content:encoded><![CDATA[<p>I think that Exercise 2.10 is still not correct. For example, the following passes the current conditional check suggested by David Clark, yet this causes a divide by zero error.</p>
<p>(div-interval (make-interval 1 2) (make-interval 0 1))</p>
<p>I used the following helper predicate in my code</p>
<p>(define (contains-zero? interval)<br />
&nbsp;&nbsp;(and (&lt;= (lower-bound interval) 0)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&gt;= (upper-bound interval) 0)))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eliben</title>
		<link>http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-123533</link>
		<dc:creator>eliben</dc:creator>
		<pubDate>Sun, 06 Jul 2008 16:11:53 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-123533</guid>
		<description>David,

You're right, and I fixed the relevant code snippet. Thanks !</description>
		<content:encoded><![CDATA[<p>David,</p>
<p>You&#8217;re right, and I fixed the relevant code snippet. Thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Clark</title>
		<link>http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-123500</link>
		<dc:creator>David Clark</dc:creator>
		<pubDate>Sat, 05 Jul 2008 21:22:07 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2007/07/27/sicp-section-214/#comment-123500</guid>
		<description>I don't think that Exercise 2.10 is correct.  They want you to check if the y interval spans zero, not if the upper and lower bounds are zero.  The correct test should be

(and (&#62; (upper-bound y) 0) (&#60; (lower-bound y) 0))

The reason for this is because the make-interval constructor would then make an illegal interval, the lower bound would be greater than the upper bound, which does not make sense.

Your solution catches a divide by zero error, but since any Lisp will already error on that condition, that check is already implicit.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think that Exercise 2.10 is correct.  They want you to check if the y interval spans zero, not if the upper and lower bounds are zero.  The correct test should be</p>
<p>(and (&gt; (upper-bound y) 0) (&lt; (lower-bound y) 0))</p>
<p>The reason for this is because the make-interval constructor would then make an illegal interval, the lower bound would be greater than the upper bound, which does not make sense.</p>
<p>Your solution catches a divide by zero error, but since any Lisp will already error on that condition, that check is already implicit.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
