this post was submitted on 24 Jan 2021
20 points (100.0% liked)

Programmer Humor

33722 readers
128 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] MsFlammkuchen@lemmy.blahaj.zone 3 points 2 years ago

Floating point arithmetic

Basically, every floating point number represents a range of numbers. Which can lead to small errors like this. It has also to do with trying to represent a decimal number in binary, which works fine for integers but not for rational numbers.