<?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: Help Wanted: IE/Win Script Weirdness</title>
	<atom:link href="http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/feed/" rel="self" type="application/rss+xml" />
	<link>http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/</link>
	<description>Things that Eric A. Meyer, CSS expert, writes about on his personal Web site; it&#039;s largely Web standards and Web technology, but also various bits of culture, politics, personal observations, and other miscellaneous stuff</description>
	<lastBuildDate>Fri, 10 May 2013 11:50:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Captain Rotundo</title>
		<link>http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-6084</link>
		<dc:creator>Captain Rotundo</dc:creator>
		<pubDate>Fri, 05 Aug 2005 02:48:24 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-6084</guid>
		<description><![CDATA[I do not know if you are still having this trouble, but I used your page to help create a page using google maps that drew various sized circles, after working and working on getting IE to work I decided to reduce the circle size to the most common (and coincidentally the smallest) I needed.  Lo and behold I discovered that increasing the PNG size in IE seems to work fine for me, its just reducing it.  

You should try your code with a PNG circle the size of the smallest circle for a relatively small blast and see how it looks on IE.  Of course scaling up an image hurts in when you zoom in on the map as the edges get pixelated, but for now I will just live with it, since for my application I need it to just work quickly anyway.]]></description>
		<content:encoded><![CDATA[<p>I do not know if you are still having this trouble, but I used your page to help create a page using google maps that drew various sized circles, after working and working on getting IE to work I decided to reduce the circle size to the most common (and coincidentally the smallest) I needed.  Lo and behold I discovered that increasing the PNG size in IE seems to work fine for me, its just reducing it.  </p>
<p>You should try your code with a PNG circle the size of the smallest circle for a relatively small blast and see how it looks on IE.  Of course scaling up an image hurts in when you zoom in on the map as the edges get pixelated, but for now I will just live with it, since for my application I need it to just work quickly anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frode Danielsen</title>
		<link>http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-6039</link>
		<dc:creator>Frode Danielsen</dc:creator>
		<pubDate>Sat, 30 Jul 2005 22:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-6039</guid>
		<description><![CDATA[Read that you have fixed some issues with comments. I tried commenting on this just minutes after this post was originally posted, but got an error. The I tried mailing you, but god a bounce-back. So I&#039;m not sure this has been received by you yet, and none of the commenters above mentioned this. Here goes:

Haha, the irony :) I&#039;m sitting here coding JS myself, and testing in  
Safari and Firefox mainly. But I need the script to work in IE as  
well, of course, so I cursed IEs lacking debugging facilities a few  
hours ago.. This led me to a google search aaand:
&lt;a href=&quot;http://blogs.msdn.com/ie/archive/2004/10/26/247912.aspx&quot; title=&quot;Scripting Debugging in Internet Explorer&quot; rel=&quot;nofollow&quot;&gt;Scripting Debugging in Internet Explorer&lt;/a&gt;]]></description>
		<content:encoded><![CDATA[<p>Read that you have fixed some issues with comments. I tried commenting on this just minutes after this post was originally posted, but got an error. The I tried mailing you, but god a bounce-back. So I&#8217;m not sure this has been received by you yet, and none of the commenters above mentioned this. Here goes:</p>
<p>Haha, the irony :) I&#8217;m sitting here coding JS myself, and testing in<br />
Safari and Firefox mainly. But I need the script to work in IE as<br />
well, of course, so I cursed IEs lacking debugging facilities a few<br />
hours ago.. This led me to a google search aaand:<br />
<a href="http://blogs.msdn.com/ie/archive/2004/10/26/247912.aspx" title="Scripting Debugging in Internet Explorer" rel="nofollow">Scripting Debugging in Internet Explorer</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sayantani</title>
		<link>http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5995</link>
		<dc:creator>Sayantani</dc:creator>
		<pubDate>Thu, 28 Jul 2005 11:48:03 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5995</guid>
		<description><![CDATA[HI
you need to write return Math.round ( (x*rt) / rt);
That&#039;ll solve your problem.

Thanks
Sayantani from india
]]></description>
		<content:encoded><![CDATA[<p>HI<br />
you need to write return Math.round ( (x*rt) / rt);<br />
That&#8217;ll solve your problem.</p>
<p>Thanks<br />
Sayantani from india</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Meyer</title>
		<link>http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5994</link>
		<dc:creator>Eric Meyer</dc:creator>
		<pubDate>Wed, 27 Jul 2005 19:41:10 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5994</guid>
		<description><![CDATA[Between Grant&#039;s code (as well as related routines seen elsewhere) and &lt;a href=&quot;http://groups-beta.google.com/group/Google-Maps-API/tree/browse_frm/thread/9b36c92660ea8f93/47bd77b79b0b52c8?rnum=1&amp;hl=en&amp;_done=%2Fgroup%2FGoogle-Maps-API%2Fbrowse_frm%2Fthread%2F9b36c92660ea8f93%2Ffff38f7d8fd7cddf%3F#doc_c3820fb8dcbf4d1e&quot; rel=&quot;nofollow&quot;&gt;help received&lt;/a&gt; on the &lt;a href=&quot;http://groups-beta.google.com/group/Google-Maps-API/&quot; rel=&quot;nofollow&quot;&gt;google-maps-api discussion group&lt;/a&gt;, everything&#039;s back to normal in IE/Win.  Thanks for the assistance, folks!
]]></description>
		<content:encoded><![CDATA[<p>Between Grant&#8217;s code (as well as related routines seen elsewhere) and <a href="http://groups-beta.google.com/group/Google-Maps-API/tree/browse_frm/thread/9b36c92660ea8f93/47bd77b79b0b52c8?rnum=1&amp;hl=en&amp;_done=%2Fgroup%2FGoogle-Maps-API%2Fbrowse_frm%2Fthread%2F9b36c92660ea8f93%2Ffff38f7d8fd7cddf%3F#doc_c3820fb8dcbf4d1e" rel="nofollow">help received</a> on the <a href="http://groups-beta.google.com/group/Google-Maps-API/" rel="nofollow">google-maps-api discussion group</a>, everything&#8217;s back to normal in IE/Win.  Thanks for the assistance, folks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Grant Gatchel</title>
		<link>http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5990</link>
		<dc:creator>Grant Gatchel</dc:creator>
		<pubDate>Wed, 27 Jul 2005 13:04:57 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5990</guid>
		<description><![CDATA[Here&#039;s some code I&#039;ve used for an order form. I probably stole it from someone many years ago, and only refer back to it when something like that creeps up, but it works. It&#039;s designed for trimming to hundredths (for cents in USD) but I&#039;m sure you can modify it for your needs too. One of these days, i&#039;m gonna have to clean this up...
&lt;code&gt;
//this function makes sure any number is properly rounded to two decimal places
function fix(num) {
 
	// fix that damn math rounding bug, AAARGGGGGGG!!!
	string = &quot;&quot; + Math.round(num*Math.pow(10,2))/Math.pow(10,2); 
 
	// then massage the data to get a useful price
	if (string.indexOf(&#039;.&#039;) == -1)
		return string + &#039;.00&#039;;
	seperation = string.length - string.indexOf(&#039;.&#039;);
	if (seperation &gt; 3)
		return string.substring(0,string.length-seperation+3);
	else if (seperation == 2)
		return string + &#039;0&#039;;
	
	return string;
}
&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>Here&#8217;s some code I&#8217;ve used for an order form. I probably stole it from someone many years ago, and only refer back to it when something like that creeps up, but it works. It&#8217;s designed for trimming to hundredths (for cents in USD) but I&#8217;m sure you can modify it for your needs too. One of these days, i&#8217;m gonna have to clean this up&#8230;<br />
<code><br />
//this function makes sure any number is properly rounded to two decimal places<br />
function fix(num) {</p>
<p>	// fix that damn math rounding bug, AAARGGGGGGG!!!<br />
	string = "" + Math.round(num*Math.pow(10,2))/Math.pow(10,2); </p>
<p>	// then massage the data to get a useful price<br />
	if (string.indexOf('.') == -1)<br />
		return string + '.00';<br />
	seperation = string.length - string.indexOf('.');<br />
	if (seperation &gt; 3)<br />
		return string.substring(0,string.length-seperation+3);<br />
	else if (seperation == 2)<br />
		return string + '0';</p>
<p>	return string;<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: db48x</title>
		<link>http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5989</link>
		<dc:creator>db48x</dc:creator>
		<pubDate>Wed, 27 Jul 2005 01:50:04 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5989</guid>
		<description><![CDATA[&lt;blockquote&gt;instead of the expected 0.71, I&quot;m getting results like 0.7100000000000001. Huh? Where the heck did that come from? Is this fallout from that Intel rounding bug everyone was getting resultssmirking about five years ago, or what?&lt;/blockquote&gt;

This has nothing to do with the infamous Intel math bug from ages ago. For one thing, that&#039;s been fixed for quite some time now. Also, it didn&#039;t manifest every time you did math on the processor, only when converting a floating point number to an integer, and then only when the number was far too large to fit in the integer anyway. As I recall it failed to handle the overflow error correctly.

Anyway, floating point numbers are always a pain. As Patrice says, computers just don&#039;t have enough room to store all the binary digits needed to represent numbers we commonly represent with one or two decimal digits.]]></description>
		<content:encoded><![CDATA[<blockquote><p>instead of the expected 0.71, I&#8221;m getting results like 0.7100000000000001. Huh? Where the heck did that come from? Is this fallout from that Intel rounding bug everyone was getting resultssmirking about five years ago, or what?</p></blockquote>
<p>This has nothing to do with the infamous Intel math bug from ages ago. For one thing, that&#8217;s been fixed for quite some time now. Also, it didn&#8217;t manifest every time you did math on the processor, only when converting a floating point number to an integer, and then only when the number was far too large to fit in the integer anyway. As I recall it failed to handle the overflow error correctly.</p>
<p>Anyway, floating point numbers are always a pain. As Patrice says, computers just don&#8217;t have enough room to store all the binary digits needed to represent numbers we commonly represent with one or two decimal digits.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Meyer</title>
		<link>http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5987</link>
		<dc:creator>Eric Meyer</dc:creator>
		<pubDate>Tue, 26 Jul 2005 23:28:14 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5987</guid>
		<description><![CDATA[Thanks to information related to the results in Patrice&#039;s comment, I discovered a method that works in Google Maps capable browsers: &lt;code&gt;toFixed(n)&lt;/code&gt;.  It works for the cases I need, which are the radius distances and map sizes.  So that&#039;s fixed in the -db version.

As for the circle sizing, it is indeed an effect of the way markers are constructed, and the IE filter stuff Tim pointed out.  I found &lt;a href=&quot;http://groups-beta.google.com/group/Google-Maps-API/browse_thread/thread/d5868300ec324b94/36b847eb6ee33f06?q=+IE+marker+scale&amp;rnum=1#36b847eb6ee33f06&quot;&gt;one comment&lt;/a&gt; in the &lt;a href=&quot;http://groups-beta.google.com/group/Google-Maps-API/&quot;&gt;Google Maps discussion group&lt;/a&gt; about this, basically pointing out the problem but not knowing how to fix it.  I didn&#039;t see any replies, so I&#039;d guess it&#039;s something still to do.  I&#039;ll take a crack at fixing it on the client side, but will also propose a fix in the discussion group.  (As well as ask for real honest-to-gosh circle primitives so I don&#039;t have to mess with scaled markers any more.)]]></description>
		<content:encoded><![CDATA[<p>Thanks to information related to the results in Patrice&#8217;s comment, I discovered a method that works in Google Maps capable browsers: <code>toFixed(n)</code>.  It works for the cases I need, which are the radius distances and map sizes.  So that&#8217;s fixed in the -db version.</p>
<p>As for the circle sizing, it is indeed an effect of the way markers are constructed, and the IE filter stuff Tim pointed out.  I found <a href="http://groups-beta.google.com/group/Google-Maps-API/browse_thread/thread/d5868300ec324b94/36b847eb6ee33f06?q=+IE+marker+scale&#038;rnum=1#36b847eb6ee33f06">one comment</a> in the <a href="http://groups-beta.google.com/group/Google-Maps-API/">Google Maps discussion group</a> about this, basically pointing out the problem but not knowing how to fix it.  I didn&#8217;t see any replies, so I&#8217;d guess it&#8217;s something still to do.  I&#8217;ll take a crack at fixing it on the client side, but will also propose a fix in the discussion group.  (As well as ask for real honest-to-gosh circle primitives so I don&#8217;t have to mess with scaled markers any more.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrice Levesque</title>
		<link>http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5982</link>
		<dc:creator>Patrice Levesque</dc:creator>
		<pubDate>Tue, 26 Jul 2005 12:59:12 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5982</guid>
		<description><![CDATA[Fractional numbers in computers are not stored as intuitively as we may think.  As with numbers above 1, they&#039;re stored as powers of two:

5 = 1*(2^2) + 0*(2^1) + 1*(2^0); written as 101 in binary
0.75 = 0*(2^0) + 1*(2^-1) + 1 * (2^-2) = 0.11 in binary

There is a limit to the number of bits a number can use; for pure integer numbers the limit is pretty high but with fractional numbers, there are rounding errors all over the place for numbers that at first may appear trival; 0.1 (decimal) is represented as 0.00011[0011...] so adding 10 times 0.1 will probably not give 1

Floating-point numbers are always something to avoid when possible (especially testing for equality between them).  Depending on variable storage size, CPU, order of functions, errors will accumulate.

The safest way to work around the problem is to cast the float to a string, chop the string and cast back to a float - hoping this function is not used 10 times a second :)

Should you want to know more about this problem, you can scan these threads:
http://groups-beta.google.com/groups?hl=en&amp;lr=&amp;ie=UTF-8&amp;num=50&amp;q=johnh%20rounding%20%22decimal%20places%22&amp;qt_s=Search
]]></description>
		<content:encoded><![CDATA[<p>Fractional numbers in computers are not stored as intuitively as we may think.  As with numbers above 1, they&#8217;re stored as powers of two:</p>
<p>5 = 1*(2^2) + 0*(2^1) + 1*(2^0); written as 101 in binary<br />
0.75 = 0*(2^0) + 1*(2^-1) + 1 * (2^-2) = 0.11 in binary</p>
<p>There is a limit to the number of bits a number can use; for pure integer numbers the limit is pretty high but with fractional numbers, there are rounding errors all over the place for numbers that at first may appear trival; 0.1 (decimal) is represented as 0.00011[0011...] so adding 10 times 0.1 will probably not give 1</p>
<p>Floating-point numbers are always something to avoid when possible (especially testing for equality between them).  Depending on variable storage size, CPU, order of functions, errors will accumulate.</p>
<p>The safest way to work around the problem is to cast the float to a string, chop the string and cast back to a float &#8211; hoping this function is not used 10 times a second :)</p>
<p>Should you want to know more about this problem, you can scan these threads:<br />
<a href="http://groups-beta.google.com/groups?hl=en&#038;lr=&#038;ie=UTF-8&#038;num=50&#038;q=johnh%20rounding%20%22decimal%20places%22&#038;qt_s=Search" rel="nofollow">http://groups-beta.google.com/groups?hl=en&#038;lr=&#038;ie=UTF-8&#038;num=50&#038;q=johnh%20rounding%20%22decimal%20places%22&#038;qt_s=Search</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5981</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Tue, 26 Jul 2005 08:21:29 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5981</guid>
		<description><![CDATA[Ditto. #1 works fine on XP and IE6. Virtual PC I reckon.

Problem #2. 
You are using a PNG in IE. Welcome to the funhouse!

The only way of making IE (pre v7!) display PNGs properly is using filters and the AlphaImageLoader. This seems to be what Google are doing, otherwise you&#039;d get grey bits for transparency etc. 

So there is a bug in the way Google does the sizing of PNGs using the AlphaImageLoader, they should be using &#039;scale&#039; and they&#039;re using &#039;crop&#039;. Or assuming the size of the element is the same as the size of image. I&#039;d report it to them.

Can you set the size of the GIcon before you set the image? Or is it only available in the constructor?
]]></description>
		<content:encoded><![CDATA[<p>Ditto. #1 works fine on XP and IE6. Virtual PC I reckon.</p>
<p>Problem #2.<br />
You are using a PNG in IE. Welcome to the funhouse!</p>
<p>The only way of making IE (pre v7!) display PNGs properly is using filters and the AlphaImageLoader. This seems to be what Google are doing, otherwise you&#8217;d get grey bits for transparency etc. </p>
<p>So there is a bug in the way Google does the sizing of PNGs using the AlphaImageLoader, they should be using &#8216;scale&#8217; and they&#8217;re using &#8216;crop&#8217;. Or assuming the size of the element is the same as the size of image. I&#8217;d report it to them.</p>
<p>Can you set the size of the GIcon before you set the image? Or is it only available in the constructor?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lachlan Hunt</title>
		<link>http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5980</link>
		<dc:creator>Lachlan Hunt</dc:creator>
		<pubDate>Tue, 26 Jul 2005 07:17:05 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2005/07/25/help-wanted-iewin-script-weirdness/#comment-5980</guid>
		<description><![CDATA[Problem #1: I don&#039;t understand what you&#039;re IE is doing, that rounding function works perfectly for me in IE6, Firefox and Opera.]]></description>
		<content:encoded><![CDATA[<p>Problem #1: I don&#8217;t understand what you&#8217;re IE is doing, that rounding function works perfectly for me in IE6, Firefox and Opera.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->