<?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 Perils</title>
	<atom:link href="http://www.entertainingcode.com/archives/floating-point-perils/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.entertainingcode.com/archives/floating-point-perils/</link>
	<description>Coding and the games industry</description>
	<lastBuildDate>Sat, 10 Jul 2010 08:04:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rick Regan</title>
		<link>http://www.entertainingcode.com/archives/floating-point-perils/comment-page-1/#comment-241</link>
		<dc:creator>Rick Regan</dc:creator>
		<pubDate>Thu, 28 May 2009 14:28:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.entertainingcode.com/?p=604#comment-241</guid>
		<description>I didn&#039;t really mean &quot;10 times&quot; as in multiplication, I meant &quot;adding 10 times&quot;. Multiplying by 10 correctly gives 1.0!</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t really mean &#8220;10 times&#8221; as in multiplication, I meant &#8220;adding 10 times&#8221;. Multiplying by 10 correctly gives 1.0!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rick Regan</title>
		<link>http://www.entertainingcode.com/archives/floating-point-perils/comment-page-1/#comment-240</link>
		<dc:creator>Rick Regan</dc:creator>
		<pubDate>Thu, 28 May 2009 14:15:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.entertainingcode.com/?p=604#comment-240</guid>
		<description>The interesting thing about the &quot;10 times 0.1&quot; problem is that, not only is not equal to 1, but it&#039;s LESS than 1. 10 times 0.1000000000000000055511151231257827021181583404541015625 is 1.000000000000000055511151231257827021181583404541015625, but double precision floating-point arithmetic gives 0.99999999999999988897769753748434595763683319091796875.

So in other words, there are two aspects that come into play: the inexactness of the conversion and the inexactness of the arithmetic.</description>
		<content:encoded><![CDATA[<p>The interesting thing about the &#8220;10 times 0.1&#8243; problem is that, not only is not equal to 1, but it&#8217;s LESS than 1. 10 times 0.1000000000000000055511151231257827021181583404541015625 is 1.000000000000000055511151231257827021181583404541015625, but double precision floating-point arithmetic gives 0.99999999999999988897769753748434595763683319091796875.</p>
<p>So in other words, there are two aspects that come into play: the inexactness of the conversion and the inexactness of the arithmetic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: slicedlime</title>
		<link>http://www.entertainingcode.com/archives/floating-point-perils/comment-page-1/#comment-239</link>
		<dc:creator>slicedlime</dc:creator>
		<pubDate>Thu, 28 May 2009 05:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.entertainingcode.com/?p=604#comment-239</guid>
		<description>My point was hardly that fixed-point is better -- the part about the speed of calculations was meant to be in the context of early computing, not today. I&#039;ve only actually used it once in my life -- but I do know situations where a fixed-point solution is a whole lot better than double-precision floats (especially in the business of huge-world games, where the precision problems just become too noticeable).

Thanks for the comment, I&#039;ll edit the post to make those things more clear.</description>
		<content:encoded><![CDATA[<p>My point was hardly that fixed-point is better &#8212; the part about the speed of calculations was meant to be in the context of early computing, not today. I&#8217;ve only actually used it once in my life &#8212; but I do know situations where a fixed-point solution is a whole lot better than double-precision floats (especially in the business of huge-world games, where the precision problems just become too noticeable).</p>
<p>Thanks for the comment, I&#8217;ll edit the post to make those things more clear.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: magice</title>
		<link>http://www.entertainingcode.com/archives/floating-point-perils/comment-page-1/#comment-238</link>
		<dc:creator>magice</dc:creator>
		<pubDate>Thu, 28 May 2009 02:01:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.entertainingcode.com/?p=604#comment-238</guid>
		<description>Your opinion has 2 problems:

a. The view that &quot;fixed-point is fast, floating-point is slow&quot; is extremely archaic in most of today computers (or at least desktop computers). Even in the general purpose CPU (like Pentium), the speed for floating-point number calculations is either as fast or sometimes faster than that of fixed-point calculation. I did not believe it myself, but that was the result after we time the calculation in one of my computer architecture class. Of course, this does not take in account the fact that many of these calculations (graphic related) are done by the GPU, free up CPU for other tasks.

2. Double precision floating point number is actually pretty precise. In fact, many programming languages, such Javascript, Lua, etc. , provide only 1 type of number, namely double-precision floating point. For most of the cases, this precision is as good as one needs (as long as you don&#039;t do == directly in C/C++ family).</description>
		<content:encoded><![CDATA[<p>Your opinion has 2 problems:</p>
<p>a. The view that &#8220;fixed-point is fast, floating-point is slow&#8221; is extremely archaic in most of today computers (or at least desktop computers). Even in the general purpose CPU (like Pentium), the speed for floating-point number calculations is either as fast or sometimes faster than that of fixed-point calculation. I did not believe it myself, but that was the result after we time the calculation in one of my computer architecture class. Of course, this does not take in account the fact that many of these calculations (graphic related) are done by the GPU, free up CPU for other tasks.</p>
<p>2. Double precision floating point number is actually pretty precise. In fact, many programming languages, such Javascript, Lua, etc. , provide only 1 type of number, namely double-precision floating point. For most of the cases, this precision is as good as one needs (as long as you don&#8217;t do == directly in C/C++ family).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
