This site goes over this creepiness in detail and explains why it occurs.
Really random ramblings of a Doctor Who fanatic, an astronomy enthusiast and a not-so-bad coder.
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.
This site goes over this creepiness in detail and explains why it occurs.
Labels:
programming
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment