<?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: Weird behavior of numbers in as3</title>
	<atom:link href="http://blog.andre-michelle.com/2007/weird_behavior_of_numbers_in_as3/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.andre-michelle.com/2007/weird_behavior_of_numbers_in_as3/</link>
	<description>♥</description>
	<lastBuildDate>Wed, 08 Sep 2010 19:10:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Brandon</title>
		<link>http://blog.andre-michelle.com/2007/weird_behavior_of_numbers_in_as3/comment-page-1/#comment-33122</link>
		<dc:creator>Brandon</dc:creator>
		<pubDate>Wed, 08 Sep 2010 19:10:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2007/171/#comment-33122</guid>
		<description>Hey thanks for the article! I&#039;m trying to get the decimal part out of a Number. I was just trying to narrow down the bits that store the decimal part so I did the following and got 0. Now I&#039;m stuck.

trace( 1.23 &amp; 2.23 );//0

Any suggestions?</description>
		<content:encoded><![CDATA[<p>Hey thanks for the article! I&#8217;m trying to get the decimal part out of a Number. I was just trying to narrow down the bits that store the decimal part so I did the following and got 0. Now I&#8217;m stuck.</p>
<p>trace( 1.23 &amp; 2.23 );//0</p>
<p>Any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tenegri&#8217;s blog &#187; Blog Archive &#187; Are there real int and uint types?</title>
		<link>http://blog.andre-michelle.com/2007/weird_behavior_of_numbers_in_as3/comment-page-1/#comment-3923</link>
		<dc:creator>Tenegri&#8217;s blog &#187; Blog Archive &#187; Are there real int and uint types?</dc:creator>
		<pubDate>Sat, 03 May 2008 15:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2007/171/#comment-3923</guid>
		<description>[...] Christensen: AS3 Interesting Numeric Storage Behavior Andre Michelle: Weird behavior of numbers in as3 Michael Baczynski: Bitwise gems - fast integer math Michael Baczynski: Int, uint and number data [...]</description>
		<content:encoded><![CDATA[<p>[...] Christensen: AS3 Interesting Numeric Storage Behavior Andre Michelle: Weird behavior of numbers in as3 Michael Baczynski: Bitwise gems &#8211; fast integer math Michael Baczynski: Int, uint and number data [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bram</title>
		<link>http://blog.andre-michelle.com/2007/weird_behavior_of_numbers_in_as3/comment-page-1/#comment-1027</link>
		<dc:creator>bram</dc:creator>
		<pubDate>Mon, 18 Jun 2007 08:16:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2007/171/#comment-1027</guid>
		<description>Nikolaj, that&#039;s pretty standard IEEE roundof errors. Have a look here:

http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems</description>
		<content:encoded><![CDATA[<p>Nikolaj, that&#8217;s pretty standard IEEE roundof errors. Have a look here:</p>
<p><a href="http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems" rel="nofollow">http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikolaj</title>
		<link>http://blog.andre-michelle.com/2007/weird_behavior_of_numbers_in_as3/comment-page-1/#comment-1026</link>
		<dc:creator>Nikolaj</dc:creator>
		<pubDate>Sun, 17 Jun 2007 20:48:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2007/171/#comment-1026</guid>
		<description>Speaking of weird number behavior.. What is going on here?

var n:Number = 2374;
trace(n);
trace(n*.01);

Traces:

2374
23.740000000000002</description>
		<content:encoded><![CDATA[<p>Speaking of weird number behavior.. What is going on here?</p>
<p>var n:Number = 2374;<br />
trace(n);<br />
trace(n*.01);</p>
<p>Traces:</p>
<p>2374<br />
23.740000000000002</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate Chatellier</title>
		<link>http://blog.andre-michelle.com/2007/weird_behavior_of_numbers_in_as3/comment-page-1/#comment-1025</link>
		<dc:creator>Nate Chatellier</dc:creator>
		<pubDate>Tue, 12 Jun 2007 22:26:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2007/171/#comment-1025</guid>
		<description>Great post... but, hmm, Sho claims that his tests led him to believe that Numbers may actually be faster than ints in Flash:
&lt;a href=&quot;http://kuwamoto.org/2006/06/15/avoid-ints-in-actionscript/&quot; title=&quot;Avoid ints in ActionScript&quot; rel=&quot;nofollow&quot;&gt;

Grant Skinner&#039;s tests showed that ints had only a small improvement over Number, but uint was much worse then either:
&lt;/a&gt;&lt;a href=&quot;http://www.gskinner.com/blog/archives/2006/06/types_in_as3_in.html&quot; title=&quot;Types in AS3-ints not so fast, uints slow!&quot; rel=&quot;nofollow&quot;&gt;

Michael Baczynski claims that it is converting between types is the big killer (which makes sense):
&lt;/a&gt;&lt;a href=&quot;http://lab.polygonal.de/2007/06/06/int-uint-and-number-data-type-conversion/&quot; title=&quot;Int, uint and number data type conversion&quot; rel=&quot;nofollow&quot;&gt;

It seems like the only consistent claim is that numerical data types in Flash are inconsistent ;)&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Great post&#8230; but, hmm, Sho claims that his tests led him to believe that Numbers may actually be faster than ints in Flash:<br />
<a href="http://kuwamoto.org/2006/06/15/avoid-ints-in-actionscript/" title="Avoid ints in ActionScript" rel="nofollow"></p>
<p>Grant Skinner&#8217;s tests showed that ints had only a small improvement over Number, but uint was much worse then either:<br />
</a><a href="http://www.gskinner.com/blog/archives/2006/06/types_in_as3_in.html" title="Types in AS3-ints not so fast, uints slow!" rel="nofollow"></p>
<p>Michael Baczynski claims that it is converting between types is the big killer (which makes sense):<br />
</a><a href="http://lab.polygonal.de/2007/06/06/int-uint-and-number-data-type-conversion/" title="Int, uint and number data type conversion" rel="nofollow"></p>
<p>It seems like the only consistent claim is that numerical data types in Flash are inconsistent ;)</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bram</title>
		<link>http://blog.andre-michelle.com/2007/weird_behavior_of_numbers_in_as3/comment-page-1/#comment-1024</link>
		<dc:creator>bram</dc:creator>
		<pubDate>Wed, 06 Jun 2007 15:17:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2007/171/#comment-1024</guid>
		<description>Someone @ Adobe writes us back the explanation:

&lt;blockquote cite=&quot;&quot;&gt;
The AS3 VM uses 32-bit Atom formats to store various types.  3-bits of the Atom describe the type data, leaving 29-bits for actual data.  In some cases, like null/undefined/void/etc, we use 3-bits plus a few more bits to define the type.

For signed integers, we have 28-bits to work with plus a sign bit.  For unsigned integers we have 29-bits (or maybe 28 with the upper bit always zero?).  Once your number gets larger than 28/29 bits, we dynamically switch it to a Number Atom type, which contains a 3-bit type value with a 29-bit ptr.  All ptrs are 8-BYTE aligned so we get away with using 29-bits there.

All three formats are basically interchangeable.  When storing a number in an Atom, we see if it&#039;s an integer and fits within the 28/29 bits.  If so, we store it as a int/uint value - otherwise we store it as a Number value.
&lt;/blockquote&gt;

Which, sadly enough makes total sense and is a bit of a bummer for us...</description>
		<content:encoded><![CDATA[<p>Someone @ Adobe writes us back the explanation:</p>
<blockquote cite=""><p>
The AS3 VM uses 32-bit Atom formats to store various types.  3-bits of the Atom describe the type data, leaving 29-bits for actual data.  In some cases, like null/undefined/void/etc, we use 3-bits plus a few more bits to define the type.</p>
<p>For signed integers, we have 28-bits to work with plus a sign bit.  For unsigned integers we have 29-bits (or maybe 28 with the upper bit always zero?).  Once your number gets larger than 28/29 bits, we dynamically switch it to a Number Atom type, which contains a 3-bit type value with a 29-bit ptr.  All ptrs are 8-BYTE aligned so we get away with using 29-bits there.</p>
<p>All three formats are basically interchangeable.  When storing a number in an Atom, we see if it&#8217;s an integer and fits within the 28/29 bits.  If so, we store it as a int/uint value &#8211; otherwise we store it as a Number value.
</p></blockquote>
<p>Which, sadly enough makes total sense and is a bit of a bummer for us&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: someone</title>
		<link>http://blog.andre-michelle.com/2007/weird_behavior_of_numbers_in_as3/comment-page-1/#comment-1023</link>
		<dc:creator>someone</dc:creator>
		<pubDate>Tue, 05 Jun 2007 22:02:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.andre-michelle.com/2007/171/#comment-1023</guid>
		<description>Anti-Spam: What is the sum of 7 and 3?

int</description>
		<content:encoded><![CDATA[<p>Anti-Spam: What is the sum of 7 and 3?</p>
<p>int</p>
]]></content:encoded>
	</item>
</channel>
</rss>
