this post was submitted on 26 Feb 2024
751 points (95.7% liked)

Programmer Humor

19463 readers
263 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 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Psythik@lemmy.world 15 points 8 months ago (2 children)

While we're at it, what the hell is -0 and how does it differ from 0?

[–] Reddfugee42@lemmy.world 7 points 8 months ago (1 children)
[–] ShepherdPie@midwest.social 5 points 8 months ago (1 children)

So it's just like 0 but with an evil goatee?

[–] Knock_Knock_Lemmy_In@lemmy.world 8 points 8 months ago

Look at the graph of y=tan(x)+ⲡ/2

-0 and +0 are completely different.

[–] computerscientistI@lemm.ee 2 points 8 months ago

For integers it really doesn't exist. An algorithm for multiplying an integer with -1 is: Invert all bits and add 1 to the right-most bit. You can do that for 0 of course, it won't hurt.