this post was submitted on 09 Oct 2025
733 points (99.3% liked)

Programmer Humor

26817 readers
2991 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
[–] jjjalljs@ttrpg.network 10 points 1 day ago

Use a dedicated data type or library. Some languages also have something like python's Decimal type

>>> .1 + .2
0.30000000000000004
>>> Decimal(".1") + Decimal(".2")
Decimal('0.3')