Why do simple math operations on floating point return unexpected (inaccurate) results in VB.Net and Python?

Float/double precision.

You must remember that in binary, 4.1 = 4 + 1/10. 1/10 is an infinitely repeating sum in binary, much like 1/9 is an infinite sum in decimal.

Leave a Comment