<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>What could numeric rounding possibly have to do with MS-DOS?</title><link>http://blogs.msdn.com/b/ericlippert/archive/2003/09/26/53112.aspx</link><description>A reader points out that FormatNumber uses yet a different rounding algorithm. FormatNumber rounds numbers ending in .5's away from zero, not towards evens. He also asks whether FormatNumber, FormatCurrency, etc, actually call into the VBA Format$ code</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Bankers' Rounding</title><link>http://blogs.msdn.com/b/ericlippert/archive/2003/09/26/53112.aspx#4795413</link><pubDate>Fri, 07 Sep 2007 01:09:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4795413</guid><dc:creator>Fabulous Adventures In Coding</dc:creator><description>&lt;p&gt;A number of people have pointed out to me over the years that VBScript's Round function is a bit weird. It seems like it should be pretty straightforward -- you pick the integer closest to the number you've got, end of story. But what about, say, 1.5?&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4795413" width="1" height="1"&gt;</description></item><item><title>re: Bankers' Rounding</title><link>http://blogs.msdn.com/b/ericlippert/archive/2003/09/26/53112.aspx#77198</link><pubDate>Fri, 20 Feb 2004 21:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:77198</guid><dc:creator>Fabulous Adventures In Coding</dc:creator><description>&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=77198" width="1" height="1"&gt;</description></item><item><title>RE: What could numeric rounding possibly have to do with MS-DOS?</title><link>http://blogs.msdn.com/b/ericlippert/archive/2003/09/26/53112.aspx#53116</link><pubDate>Mon, 29 Sep 2003 20:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:53116</guid><dc:creator>Eric Lippert</dc:creator><description>&amp;gt;  Over the years my cohorts and I have traded numerous unresolved bets about what it must be doing internally for some situation or another

Well, I have all the source code on my machine still, so I can settle some of those bets.  

I was just glancing at it to refresh my memory -- I haven't looked at this thing since 1997 at least.  Format$ is about 5500 lines of C++ code (counting blank lines and comments).  About 1300 of those lines are the parser that turns the &amp;quot;format picture&amp;quot; into an internal representation.  (Incidentally, the implementation of Format in VB.NET is tiny, since most of the work is done by the underlying String.Format method in the framework.  )&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=53116" width="1" height="1"&gt;</description></item><item><title>RE: What could numeric rounding possibly have to do with MS-DOS?</title><link>http://blogs.msdn.com/b/ericlippert/archive/2003/09/26/53112.aspx#53113</link><pubDate>Sat, 27 Sep 2003 06:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:53113</guid><dc:creator>Eric W. Bachtal</dc:creator><description>I've always wanted to see the inside of Format$.  Over the years my cohorts and I have traded numerous unresolved bets about what it must be doing internally for some situation or another.  What a wonder.  How many other routines express so much functionality from such a tiny facade (give me a couple of parameters, and I'll give you the world!)  Thanks for the little peek. 

In so much as you get infinitely more traffic than me, I'd like to repeat this link to KB 196652 here, as a lot of folks want to learn more about rounding and (as importantly) the differences in rounding in various MS products:

http://support.microsoft.com/default.aspx?scid=kb;en-us;196652

Thanks again .
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=53113" width="1" height="1"&gt;</description></item></channel></rss>