<?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: Reminder: Floats are not precise</title>
	<atom:link href="http://www.rogue-development.com/blog2/2009/05/reminder-floats-are-not-precise/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rogue-development.com/blog2/2009/05/reminder-floats-are-not-precise/</link>
	<description>Comments and thoughts on technology from Marc Hughes</description>
	<lastBuildDate>Wed, 14 Jul 2010 19:03:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jose</title>
		<link>http://www.rogue-development.com/blog2/2009/05/reminder-floats-are-not-precise/comment-page-1/#comment-897</link>
		<dc:creator>Jose</dc:creator>
		<pubDate>Wed, 17 Jun 2009 20:52:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=405#comment-897</guid>
		<description>actionscript 3.0

if you trace (0.1+0.1+0.1);

//output// = 0.30000000000000004
 and 
0.30000000000000004 is diferent to 3/10, as3.0 is right!:S</description>
		<content:encoded><![CDATA[<p>actionscript 3.0</p>
<p>if you trace (0.1+0.1+0.1);</p>
<p>//output// = 0.30000000000000004<br />
 and<br />
0.30000000000000004 is diferent to 3/10, as3.0 is right!:S</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: .: WEREMSOFT :. &#187; El diario del domingo - 17 de mayo del 2009</title>
		<link>http://www.rogue-development.com/blog2/2009/05/reminder-floats-are-not-precise/comment-page-1/#comment-794</link>
		<dc:creator>.: WEREMSOFT :. &#187; El diario del domingo - 17 de mayo del 2009</dc:creator>
		<pubDate>Sun, 17 May 2009 19:51:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=405#comment-794</guid>
		<description>[...] Un tipo muy muy groso explica con ejemplos el error matematico de los floats en flash, java y ruby LINK [...]</description>
		<content:encoded><![CDATA[<p>[...] Un tipo muy muy groso explica con ejemplos el error matematico de los floats en flash, java y ruby LINK [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc</title>
		<link>http://www.rogue-development.com/blog2/2009/05/reminder-floats-are-not-precise/comment-page-1/#comment-791</link>
		<dc:creator>Marc</dc:creator>
		<pubDate>Fri, 15 May 2009 12:04:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=405#comment-791</guid>
		<description>Thanks Kathryn, I completely missed that.  It&#039;s fixed now.</description>
		<content:encoded><![CDATA[<p>Thanks Kathryn, I completely missed that.  It&#8217;s fixed now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kathryn</title>
		<link>http://www.rogue-development.com/blog2/2009/05/reminder-floats-are-not-precise/comment-page-1/#comment-790</link>
		<dc:creator>kathryn</dc:creator>
		<pubDate>Fri, 15 May 2009 00:38:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=405#comment-790</guid>
		<description>this post is a good reminder about float accuracy.  but i noticed that you started your actionscript with a different value (.1) than the other languages (0).  so at the end of the AS loop, you&#039;d expect the value to be 1.1, not 1.  it would be absurd for actionscript to be as far off the mark as nearly a whole decimal place after just ten additions.</description>
		<content:encoded><![CDATA[<p>this post is a good reminder about float accuracy.  but i noticed that you started your actionscript with a different value (.1) than the other languages (0).  so at the end of the AS loop, you&#8217;d expect the value to be 1.1, not 1.  it would be absurd for actionscript to be as far off the mark as nearly a whole decimal place after just ten additions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc</title>
		<link>http://www.rogue-development.com/blog2/2009/05/reminder-floats-are-not-precise/comment-page-1/#comment-787</link>
		<dc:creator>Marc</dc:creator>
		<pubDate>Thu, 14 May 2009 12:53:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=405#comment-787</guid>
		<description>I haven&#039;t run across one yet, but I&#039;m sure somebody somewhere did a BigDecimal implementation.

And hell, if not, someone should :)

But take note, these classes are always orders of magnitude slower than integers or floats.  If you can, picking a larger order of magnitude for your unit of measure and storing it as an int will be much easier and faster.</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t run across one yet, but I&#8217;m sure somebody somewhere did a BigDecimal implementation.</p>
<p>And hell, if not, someone should <img src='http://www.rogue-development.com/blog2/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>But take note, these classes are always orders of magnitude slower than integers or floats.  If you can, picking a larger order of magnitude for your unit of measure and storing it as an int will be much easier and faster.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jim</title>
		<link>http://www.rogue-development.com/blog2/2009/05/reminder-floats-are-not-precise/comment-page-1/#comment-786</link>
		<dc:creator>jim</dc:creator>
		<pubDate>Thu, 14 May 2009 10:17:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=405#comment-786</guid>
		<description>do you know of any as3 class that handles precise numbers?</description>
		<content:encoded><![CDATA[<p>do you know of any as3 class that handles precise numbers?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.rogue-development.com/blog2/2009/05/reminder-floats-are-not-precise/comment-page-1/#comment-781</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Wed, 13 May 2009 20:33:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=405#comment-781</guid>
		<description>This reminds me of a (possibly anecdotal, I can&#039;t recall where I read it) aspect of an old Cray design: To save the delay of a single NAND gate, the last few bits of a floating point operation weren&#039;t guaranteed to be accurate.  The point being that if you wanted that accuracy you should be doing a different operation in the first place.</description>
		<content:encoded><![CDATA[<p>This reminds me of a (possibly anecdotal, I can&#8217;t recall where I read it) aspect of an old Cray design: To save the delay of a single NAND gate, the last few bits of a floating point operation weren&#8217;t guaranteed to be accurate.  The point being that if you wanted that accuracy you should be doing a different operation in the first place.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc</title>
		<link>http://www.rogue-development.com/blog2/2009/05/reminder-floats-are-not-precise/comment-page-1/#comment-780</link>
		<dc:creator>Marc</dc:creator>
		<pubDate>Wed, 13 May 2009 16:52:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=405#comment-780</guid>
		<description>Ah yes, I didn&#039;t mean to imply whole classes of applications should or should not use floating math.  Whenever it matters to be exact like health, score, etc. those are all big candidates to stay in the integer realm.</description>
		<content:encoded><![CDATA[<p>Ah yes, I didn&#8217;t mean to imply whole classes of applications should or should not use floating math.  Whenever it matters to be exact like health, score, etc. those are all big candidates to stay in the integer realm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Iain</title>
		<link>http://www.rogue-development.com/blog2/2009/05/reminder-floats-are-not-precise/comment-page-1/#comment-779</link>
		<dc:creator>Iain</dc:creator>
		<pubDate>Wed, 13 May 2009 16:05:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.rogue-development.com/blog2/?p=405#comment-779</guid>
		<description>Even in games you can still get in trouble with this for variables like health. Best to use really big integers, with a max of e.g. 10,000</description>
		<content:encoded><![CDATA[<p>Even in games you can still get in trouble with this for variables like health. Best to use really big integers, with a max of e.g. 10,000</p>
]]></content:encoded>
	</item>
</channel>
</rss>
