In our project, we are taking care that all the float numbers shuld be of two decimal places only and we r not using something like BigDecimal for this to keep it simple.
So, at all the divisions I am taking care of rounding it to two decimals. Now I found a strange
test case, where in adding two numbers with two decimals each resulting in more decimals as below...
S.O.P(56.56+0.56) --- gives 57.120000000000005
S.O.P(56.56f+0.56f) --- gives 57.120003
Ideally it shud just result 57.12. Can I know the reason why it is happening like above.