"Amir Parsa" <Amir
Pa***@discussions.microsoft.com> wrote in message
news:C3**********************************@microsof t.com...
655.5555-655 =0.555500000000052
(655.55-655)*100 =54.9999999999955
Visual C# 2003
As stated by the other responders, this is the result of real number
approximation in a binary machine. Found in Java, C++, etc. as well as C#.
Here are some articles that you may find interesting:
http://www.math.grin.edu/~stone/cour...EEE-reals.html http://www.prosperosoftware.co.uk/so...PSPvFloat.html http://www.scit.wlv.ac.uk/cbook/chap4.float.html
The Decimal type in the .NET Framework is your best choice for max precision
without doing extra work.
--
Peter [MVP Visual Developer]
Jack of all trades, master of none.