On Friday 13 August 2010 16:40:41 navin wrote: > this statement System.out.println(2.0-1.10); > produces 0.8999999999999999 > can anyone explain. > Mathematically result has to be 0.9 but it gives 0.8999999999999999 > why? > Thanks.
A classic floating point problem. A quick search in Google gave me this: http://blogs.msdn.com/b/excel/archive/2008/04/10/understanding-floating-point-precision-aka-why-does-excel-give-me-seemingly-wrong-answers.aspx -- Mihai Donțu -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
