<?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 errors got you down?</title>
	<atom:link href="http://joshblog.net/2007/01/30/flash-floating-point-number-errors/feed/" rel="self" type="application/rss+xml" />
	<link>http://joshblog.net/2007/01/30/flash-floating-point-number-errors/</link>
	<description>Josh Tynjala explores Flash, Flex, and ActionScript.</description>
	<lastBuildDate>Thu, 11 Mar 2010 19:18:42 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ganesh</title>
		<link>http://joshblog.net/2007/01/30/flash-floating-point-number-errors/comment-page-1/#comment-62513</link>
		<dc:creator>Ganesh</dc:creator>
		<pubDate>Thu, 28 Jan 2010 10:11:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/archives/119/flash-floating-point-number-errors/#comment-62513</guid>
		<description>Thans man that really worked like magic! dont know what these flex guys doing</description>
		<content:encoded><![CDATA[<p>Thans man that really worked like magic! dont know what these flex guys doing</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dealing with floating point numbers in AS3 &#171; Ramblings</title>
		<link>http://joshblog.net/2007/01/30/flash-floating-point-number-errors/comment-page-1/#comment-61906</link>
		<dc:creator>Dealing with floating point numbers in AS3 &#171; Ramblings</dc:creator>
		<pubDate>Mon, 30 Nov 2009 08:08:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/archives/119/flash-floating-point-number-errors/#comment-61906</guid>
		<description>[...] Floating-point errors got you down? &#8211; Josh Talks Flash Many developers will never encounter issues when floating-point math fails to return the correct result. Every once in a while, when you&#8217;re expecting to see a number like 10.1 in your trace panel, you might actually see 10.1000000001. This isn&#8217;t a specific issue with Flash either. By it&#8217;s very nature, any sort of calculation with floating-point numbers can result in tiny, nearly insignificant errors anywhere in modern computing. [...]</description>
		<content:encoded><![CDATA[<p>[...] Floating-point errors got you down? &#8211; Josh Talks Flash Many developers will never encounter issues when floating-point math fails to return the correct result. Every once in a while, when you&#8217;re expecting to see a number like 10.1 in your trace panel, you might actually see 10.1000000001. This isn&#8217;t a specific issue with Flash either. By it&#8217;s very nature, any sort of calculation with floating-point numbers can result in tiny, nearly insignificant errors anywhere in modern computing. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Overcoming rounding errors &#171; e2easy AIR applications</title>
		<link>http://joshblog.net/2007/01/30/flash-floating-point-number-errors/comment-page-1/#comment-56250</link>
		<dc:creator>Overcoming rounding errors &#171; e2easy AIR applications</dc:creator>
		<pubDate>Thu, 25 Sep 2008 20:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/archives/119/flash-floating-point-number-errors/#comment-56250</guid>
		<description>[...] that would have involved many program operations to simulate each BCD calculation. Â Then this blog by Josh Tynjala gave me another idea. Â (Ok, probably not a new idea - but it was a revelation to [...]</description>
		<content:encoded><![CDATA[<p>[...] that would have involved many program operations to simulate each BCD calculation. Â Then this blog by Josh Tynjala gave me another idea. Â (Ok, probably not a new idea &#8211; but it was a revelation to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flash/Actionscript: Innaccurate math results : Ryan Bosinger</title>
		<link>http://joshblog.net/2007/01/30/flash-floating-point-number-errors/comment-page-1/#comment-51810</link>
		<dc:creator>Flash/Actionscript: Innaccurate math results : Ryan Bosinger</dc:creator>
		<pubDate>Mon, 21 Jul 2008 18:10:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/archives/119/flash-floating-point-number-errors/#comment-51810</guid>
		<description>[...] I originally found this information/code on a post called Floating-point errors got you down? [...]</description>
		<content:encoded><![CDATA[<p>[...] I originally found this information/code on a post called Floating-point errors got you down? [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://joshblog.net/2007/01/30/flash-floating-point-number-errors/comment-page-1/#comment-51127</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 10 Jul 2008 17:45:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/archives/119/flash-floating-point-number-errors/#comment-51127</guid>
		<description>Josh, thanks a lot man!  I actually did run into this while trying to do some AS based audio fades.  Your &quot;correctFloatingPointError&quot; function smoothed that out nicely.</description>
		<content:encoded><![CDATA[<p>Josh, thanks a lot man!  I actually did run into this while trying to do some AS based audio fades.  Your &#8220;correctFloatingPointError&#8221; function smoothed that out nicely.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Troy</title>
		<link>http://joshblog.net/2007/01/30/flash-floating-point-number-errors/comment-page-1/#comment-28032</link>
		<dc:creator>Troy</dc:creator>
		<pubDate>Tue, 04 Dec 2007 08:18:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/archives/119/flash-floating-point-number-errors/#comment-28032</guid>
		<description>Good post, Just covered some other strategies when working with floating points here: http://troyworks.com/blog/?p=70, and here&#039;s a related function for you collection:

&lt;code&gt;&lt;pre style=&quot;overflow:auto;&quot;&gt;public function notClose(number1:Number, number2:Number, precision:int = 0):Boolean
{     
    var difference:Number = number1 - number2;
    var range:Number = Math.pow(10, -precision);
    trace(-range + &quot; &quot; + difference + &quot; &quot; + range);
    var res:Boolean = ( difference &lt; -range ) &#124;&#124; ( range &gt; difference ) ;
    trace(&quot;notClose&quot; + res);
    return res;
}&lt;/pre&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Good post, Just covered some other strategies when working with floating points here: <a href="http://troyworks.com/blog/?p=70" rel="nofollow">http://troyworks.com/blog/?p=70</a>, and here&#8217;s a related function for you collection:</p>
<p><code>
<pre style="overflow:auto;">public function notClose(number1:Number, number2:Number, precision:int = 0):Boolean
{
    var difference:Number = number1 - number2;
    var range:Number = Math.pow(10, -precision);
    trace(-range + " " + difference + " " + range);
    var res:Boolean = ( difference < -range ) || ( range > difference ) ;
    trace("notClose" + res);
    return res;
}</pre>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TroyWorks &#187; Blog Archive &#187; AS3: Tips for Floating Point Hell</title>
		<link>http://joshblog.net/2007/01/30/flash-floating-point-number-errors/comment-page-1/#comment-28031</link>
		<dc:creator>TroyWorks &#187; Blog Archive &#187; AS3: Tips for Floating Point Hell</dc:creator>
		<pubDate>Tue, 04 Dec 2007 08:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/archives/119/flash-floating-point-number-errors/#comment-28031</guid>
		<description>[...] Math.round, or roundToPrecision late as possible, and only when you have [...]</description>
		<content:encoded><![CDATA[<p>[...] Math.round, or roundToPrecision late as possible, and only when you have [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: labs.tendercreative.com &#187; Blog Archive &#187; The Birds &#38; the Floating Point Errors</title>
		<link>http://joshblog.net/2007/01/30/flash-floating-point-number-errors/comment-page-1/#comment-24561</link>
		<dc:creator>labs.tendercreative.com &#187; Blog Archive &#187; The Birds &#38; the Floating Point Errors</dc:creator>
		<pubDate>Sat, 17 Nov 2007 21:39:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/archives/119/flash-floating-point-number-errors/#comment-24561</guid>
		<description>[...] there are a few adequate work-arounds (please note that these following two methods were based on a similar article from ZeusLabs for inclusion in the SASAPI Framework:  /** * Correct &quot;roundoff errors&quot; in floating point [...]</description>
		<content:encoded><![CDATA[<p>[...] there are a few adequate work-arounds (please note that these following two methods were based on a similar article from ZeusLabs for inclusion in the SASAPI Framework:  /** * Correct &quot;roundoff errors&quot; in floating point [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://joshblog.net/2007/01/30/flash-floating-point-number-errors/comment-page-1/#comment-7144</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Tue, 13 Mar 2007 17:51:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/archives/119/flash-floating-point-number-errors/#comment-7144</guid>
		<description>Awesome, thanks.  I am doing a financial services app in Flex and I can&#039;t just cavalierly wave my hand and say &quot;it&#039;s just the nature of computing&quot; like Adobe does.  I was getting something as basic as 0.08 * 0.7 = 0.55999999999999994.  This function will come in very handy, thank you!</description>
		<content:encoded><![CDATA[<p>Awesome, thanks.  I am doing a financial services app in Flex and I can&#8217;t just cavalierly wave my hand and say &#8220;it&#8217;s just the nature of computing&#8221; like Adobe does.  I was getting something as basic as 0.08 * 0.7 = 0.55999999999999994.  This function will come in very handy, thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Tome</title>
		<link>http://joshblog.net/2007/01/30/flash-floating-point-number-errors/comment-page-1/#comment-4782</link>
		<dc:creator>Daniel Tome</dc:creator>
		<pubDate>Wed, 31 Jan 2007 03:15:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.zeuslabs.us/archives/119/flash-floating-point-number-errors/#comment-4782</guid>
		<description>It happens the other way around too.
Try this in a blank flash file:

trace(10.00000000000001);//outputs 10
trace(10.0000000000001);//outputs 10.0000000000001

cheers</description>
		<content:encoded><![CDATA[<p>It happens the other way around too.<br />
Try this in a blank flash file:</p>
<p>trace(10.00000000000001);//outputs 10<br />
trace(10.0000000000001);//outputs 10.0000000000001</p>
<p>cheers</p>
]]></content:encoded>
	</item>
</channel>
</rss>
