<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Floating point numbers are a leaky abstraction</title>
	<atom:link href="http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/</link>
	<description>The blog of John D. Cook</description>
	<lastBuildDate>Thu, 18 Mar 2010 17:29:49 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Will Dwinnell</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-31724</link>
		<dc:creator>Will Dwinnell</dc:creator>
		<pubDate>Thu, 28 Jan 2010 11:21:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-31724</guid>
		<description>Tom Ochs wrote a series of articles about exactly this sort of thing in &quot;Computer Language&quot; magazine some years ago.</description>
		<content:encoded><![CDATA[<p>Tom Ochs wrote a series of articles about exactly this sort of thing in &#8220;Computer Language&#8221; magazine some years ago.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomas</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-31256</link>
		<dc:creator>Tomas</dc:creator>
		<pubDate>Wed, 20 Jan 2010 16:01:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-31256</guid>
		<description>And of course Kevin did talk about it first, my oversight.</description>
		<content:encoded><![CDATA[<p>And of course Kevin did talk about it first, my oversight.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-31214</link>
		<dc:creator>John</dc:creator>
		<pubDate>Wed, 20 Jan 2010 02:35:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-31214</guid>
		<description>Tomas: I agree that the &quot;move to the logspace&quot; trick is very important. I talk about it &lt;a href=&quot;http://www.johndcook.com/blog/2008/04/24/how-to-calculate-binomial-probabilities/&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt; in the context of computing binomial probabilities.</description>
		<content:encoded><![CDATA[<p>Tomas: I agree that the &#8220;move to the logspace&#8221; trick is very important. I talk about it <a href="http://www.johndcook.com/blog/2008/04/24/how-to-calculate-binomial-probabilities/" rel="nofollow">here</a> in the context of computing binomial probabilities.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomas</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-31213</link>
		<dc:creator>Tomas</dc:creator>
		<pubDate>Wed, 20 Jan 2010 02:27:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-31213</guid>
		<description>I&#039;m surprised to not see the &quot;move to the logspace&quot; basic trick... which is to compute exp(\sum \log x_i) in place of \prod(x_i). Works great for probabilities - they tend to be from some distribution and then central limit works for you...
Also normalizing small (or large) numbers to sum up to, say, 1.0 is better accomplished by first subtracting the max of all the logarithms.</description>
		<content:encoded><![CDATA[<p>I&#8217;m surprised to not see the &#8220;move to the logspace&#8221; basic trick&#8230; which is to compute exp(\sum \log x_i) in place of \prod(x_i). Works great for probabilities &#8211; they tend to be from some distribution and then central limit works for you&#8230;<br />
Also normalizing small (or large) numbers to sum up to, say, 1.0 is better accomplished by first subtracting the max of all the logarithms.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Don&#8217;t invert that matrix &#8212; The Endeavour</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-31014</link>
		<dc:creator>Don&#8217;t invert that matrix &#8212; The Endeavour</dc:creator>
		<pubDate>Tue, 19 Jan 2010 14:48:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-31014</guid>
		<description>[...] Floating point numbers are a leaky abstraction    ? X [...]</description>
		<content:encoded><![CDATA[<p>[...] Floating point numbers are a leaky abstraction    ? X [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2009-04-13 &#124; Yostivanich.com</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-16202</link>
		<dc:creator>links for 2009-04-13 &#124; Yostivanich.com</dc:creator>
		<pubDate>Mon, 20 Apr 2009 02:17:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-16202</guid>
		<description>[...] Floating point numbers are a leaky abstraction — The Endeavour Good remainder of some of the very real problems relying upon an abstracted system for accuracy. (tags: computer computerscience technology programming mathematics precision accuracy) [...]</description>
		<content:encoded><![CDATA[<p>[...] Floating point numbers are a leaky abstraction — The Endeavour Good remainder of some of the very real problems relying upon an abstracted system for accuracy. (tags: computer computerscience technology programming mathematics precision accuracy) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-16192</link>
		<dc:creator>John</dc:creator>
		<pubDate>Sun, 19 Apr 2009 18:40:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-16192</guid>
		<description>Jack: Every floating point number does represent a rational number, so I could see your point. But I&#039;d still say that floating point numbers are trying to approximate real numbers. Arithmetic operations are designed to be approximately correct in the analytical sense of the real line, not exactly correct in the algebraic sense of a quotient field. I think fixed-point numbers are a better model for rational numbers.</description>
		<content:encoded><![CDATA[<p>Jack: Every floating point number does represent a rational number, so I could see your point. But I&#8217;d still say that floating point numbers are trying to approximate real numbers. Arithmetic operations are designed to be approximately correct in the analytical sense of the real line, not exactly correct in the algebraic sense of a quotient field. I think fixed-point numbers are a better model for rational numbers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-16191</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Sun, 19 Apr 2009 18:16:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-16191</guid>
		<description>I disagree with your idea that floating-point is supposed to represent &quot;real numbers&quot;.  They represent rational numbers.

If you want to approximate reals with rationals, that&#039;s your choice, but you should at least understand the difference, and why you can get into trouble thereby.</description>
		<content:encoded><![CDATA[<p>I disagree with your idea that floating-point is supposed to represent &#8220;real numbers&#8221;.  They represent rational numbers.</p>
<p>If you want to approximate reals with rationals, that&#8217;s your choice, but you should at least understand the difference, and why you can get into trouble thereby.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Math Teachers at Play #5 &#171; Let&#8217;s Play Math!</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-16075</link>
		<dc:creator>Math Teachers at Play #5 &#171; Let&#8217;s Play Math!</dc:creator>
		<pubDate>Fri, 17 Apr 2009 11:16:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-16075</guid>
		<description>[...] Cook presents Floating point numbers are a leaky abstraction. This is the first of two blog posts about how computer arithmetic works and what problems to look [...]</description>
		<content:encoded><![CDATA[<p>[...] Cook presents Floating point numbers are a leaky abstraction. This is the first of two blog posts about how computer arithmetic works and what problems to look [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-16052</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 17 Apr 2009 02:48:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-16052</guid>
		<description>David Eisner: I updated the links to point to an updated version of Goldberg&#039;s paper. Thanks for pointing out the error.</description>
		<content:encoded><![CDATA[<p>David Eisner: I updated the links to point to an updated version of Goldberg&#8217;s paper. Thanks for pointing out the error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EastwoodDC</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-16001</link>
		<dc:creator>EastwoodDC</dc:creator>
		<pubDate>Thu, 16 Apr 2009 04:40:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-16001</guid>
		<description>This also ties in with your post a while back on accurately calculation the variance.</description>
		<content:encoded><![CDATA[<p>This also ties in with your post a while back on accurately calculation the variance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Cowan</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-15889</link>
		<dc:creator>John Cowan</dc:creator>
		<pubDate>Tue, 14 Apr 2009 01:28:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-15889</guid>
		<description>Not to mention the problems that arise because we think in decimal but compute in binary.  Does 0.1 + 0.2 = 0.3?  No, not in binary floats, it doesn&#039;t.</description>
		<content:encoded><![CDATA[<p>Not to mention the problems that arise because we think in decimal but compute in binary.  Does 0.1 + 0.2 = 0.3?  No, not in binary floats, it doesn&#8217;t.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Eisner</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-15879</link>
		<dc:creator>David Eisner</dc:creator>
		<pubDate>Mon, 13 Apr 2009 20:29:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-15879</guid>
		<description>Did anybody else notice the error in Figure D-1 of David Goldberg&#039;s paper (http://docs.sun.com/source/806-3568/ncg_goldberg.html#1374) ?  The &quot;0&quot; should be at the left of the number line, not at the hash mark corresponding to 1/2.</description>
		<content:encoded><![CDATA[<p>Did anybody else notice the error in Figure D-1 of David Goldberg&#8217;s paper (<a href="http://docs.sun.com/source/806-3568/ncg_goldberg.html#1374" rel="nofollow">http://docs.sun.com/source/806-3568/ncg_goldberg.html#1374</a>) ?  The &#8220;0&#8243; should be at the left of the number line, not at the hash mark corresponding to 1/2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin Peterson</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-15843</link>
		<dc:creator>Kevin Peterson</dc:creator>
		<pubDate>Mon, 13 Apr 2009 06:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-15843</guid>
		<description>Don&#039;t forget a Bayesian classifier -- it involves multiplying large numbers of small probabilities, then normalizing them. After getting strange results, and switching to BigDecimal, I learned that the usual solution is to do all calculations in log space.</description>
		<content:encoded><![CDATA[<p>Don&#8217;t forget a Bayesian classifier &#8212; it involves multiplying large numbers of small probabilities, then normalizing them. After getting strange results, and switching to BigDecimal, I learned that the usual solution is to do all calculations in log space.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Moeller</title>
		<link>http://www.johndcook.com/blog/2009/04/06/numbers-are-a-leaky-abstraction/comment-page-1/#comment-15456</link>
		<dc:creator>John Moeller</dc:creator>
		<pubDate>Mon, 06 Apr 2009 17:51:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.johndcook.com/blog/?p=1923#comment-15456</guid>
		<description>Nice post. This is a huge problem in sums too, especially when the addends are different by many orders of magnitude.</description>
		<content:encoded><![CDATA[<p>Nice post. This is a huge problem in sums too, especially when the addends are different by many orders of magnitude.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
