[Mono-list] Maths
Sebastien Pouliot
spouliot@videotron.ca
Mon, 09 Feb 2004 13:18:17 -0500
Jochen,
This is called banker's rounding.
http://thesaurus.maths.org/dictionary/map/word/3011
Sebastien
http://pages.infinit.net/ctech/poupou.html
-----Original Message-----
From: mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com]On Behalf Of Jochen Wezel
Sent: 9 fevrier 2004 13:14
To: mono-list@lists.ximian.com
Subject: [Mono-list] Maths
Hi!
Has anybody seen that behaviour yet which is produced by MS .Net?
When rounding doubles to integer, there is a rounding error:
Console.WriteLine(Convert.ToInt32(1.5)) 'is 2 - should be 2
Console.WriteLine(Convert.ToInt32(2.5)) 'is 2 - should be 3
This may be important for those guys who are programming in that area.
Jochen