in reply to Explain floating point arithmetic result

You got the response you did because you said
Can any one explain me how the result is like this instead of 5.1.

without explaining what this is. (I'm assuming it's something like 5.1000000000001.) Corion gave you the best possible leads for your enlightenment.

I'm curious: had you heard of floating-point (as opposed to decimal) numbers before? There's no reason you had to; usually only professional programmers know the concept. As you might tell, a lot of people ask the same type of question you did.

  • Comment on Re: Explain floating point arithmetic result