this post was submitted on 07 Aug 2025
714 points (98.0% liked)

Programmer Humor

37754 readers
314 users here now

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

Rules:

founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[โ€“] barubary@infosec.exchange 6 points 6 days ago (1 children)
$ python3 -c 'f = (lambda x: x + 0.5 - 0.5); print(f(2**52))'  4503599627370495.5

#python

[โ€“] Cevilia@lemmy.blahaj.zone 11 points 6 days ago

Ahh, contrived examples of floating point errors. I haven't seen those since I asked Javascript to add 0.1 and 0.2 :)