this statement System.out.println(2.0-1.10);
produces 0.8999
can anyone explain.
Mathematically result has to be 0.9 but it gives 0.8999
why?
Thanks.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
On Friday 13 August 2010 16:40:41 navin wrote:
this statement System.out.println(2.0-1.10);
produces 0.8999
can anyone explain.
Mathematically result has to be 0.9 but it gives 0.8999
why?
Thanks.
A classic floating point problem. A quick search in Google gave me