1

Possible Duplicate:
understanding floating point variables

I tried multiplying 15.95 * 3 and was expecting a result 47.85. But the result was surprising(47.849999999999994).

In some other cases also it is happening Ex: 10.65 * 3 = 31.950000000000003 10.55 * 3 = 31.650000000000002

Can anyone tell me why this is happening?

Thank you

Community
  • 1
  • 1

0 Answers0