This is apparently called Bankers Rounding. Here is a link talking about it from Borland
http://bdn.borland.com/article/0,1410,15625,00.html > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:mono-list- > [EMAIL PROTECTED]] On Behalf Of dietmar > Sent: Thursday, February 06, 2003 4:54 AM > To: [EMAIL PROTECTED] > Cc: mono-list > Subject: Re: [Mono-list] -- Math.cs -- > > Marcus just pointed out the we cant use round(), because it does not > conform to IEEE rounding conventions. Try the following test: > > using System; > > class Test { > > static void Main () { > Console.WriteLine (Math.Round((double)2.5)); > Console.WriteLine (Math.Round((double)3.5)); > Console.WriteLine (Math.Round((double)4.5)); > Console.WriteLine (Math.Round((double)5.5)); > } > } > > Result is: > > 2 > 4 > 4 > 6 > > - Dietmar > > On Sun, 2003-02-02 at 09:42, [EMAIL PROTECTED] wrote: > > Hi, > > > > Here are the final files that I got. I think that the Math performance > > is good and that the results are the most accurate that can be with > > "libm" because MS.NET are using another kind of numerical algorithms. > > > > I changed the following files: > > > > mcs/class/corlib/System/Math.cs > > mono/mono/metadata/icall.c > > mono/mono/metadata/sysmath.h > > mono/mono/metadata/sysmath.c > > > > With this mail, there is the changelog file for Math.cs (please, be > > careful with the "tildes"). > > > > Sorry for the other posts, I was trying to get this out quickly > > because > > I have a lot of work and I must study. > > > > See you, > > > > Pedro > > > > -- > > Pedro Martinez Juli� > > \ [EMAIL PROTECTED] > > )| [EMAIL PROTECTED] > > / http://yoros.cjb.net > > Socio HispaLinux #311 > > Usuario Linux #275438 - http://counter.li.org > > GnuPG public information: pub 1024D/74F1D3AC > > Key fingerprint = 8431 7B47 D2B4 5A46 5F8E 534F 588B E285 74F1 D3AC > > > > _______________________________________________ > Mono-list maillist - [EMAIL PROTECTED] > http://lists.ximian.com/mailman/listinfo/mono-list _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
