this post was submitted on 09 Oct 2025
771 points (99.1% liked)

Programmer Humor

27690 readers
315 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] gravitas_deficiency@sh.itjust.works 48 points 1 month ago* (last edited 1 month ago) (13 children)

Look at what they need to mimic a fraction inaccurately.

The fundamental mathematical nature of how binary floating point values are stored means that extremely straightforward and rational (in the mathematical sense of the term) base-10 arithmetic can surprisingly often yield results that are irrational (again, mathematically) in binary - hence why you’ll sometimes see a result of 3.000000000101325 or something like that in places where you’d expect the result to be simply 3.0

[–] 5765313496@lemmy.world 1 points 1 month ago

Look what they need to mimic a fraction of a fraction.

load more comments (12 replies)