Wednesday, August 21, 2013

Floating Point Arithmetic

As programmers some of us when dealing with floating-point arithmetic comes across the following craziness: 0.1 + 0.2 = 0.30000000000000004 or the weirdness when incrementing by 1/10 for example:



















This site goes over this creepiness in detail and explains why it occurs.

No comments :

Post a Comment