But why
this post was submitted on 24 Jan 2021
12 points (100.0% liked)
Programmer Humor
32469 readers
455 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
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.