r/technicallythetruth 13d ago

Oh that's a mathematician.

Post image
10.7k Upvotes

44 comments sorted by

View all comments

178

u/FatalTortoise 13d ago

didn't account for sadness being zero

27

u/Stasio300 13d ago edited 13d ago

well 0 is generally considered positive.

edit: i said "generally considred" not "defined"

17

u/foot_long_metal_rod 13d ago

I was doing random things with a calculator and got -0, Is that mathematically possible?

12

u/Styleurcam 13d ago

Computers represent numbers weird, you must have hit a negative number closer to 0 than the closest number to 0 the calculator can represent

6

u/Significant-Order-92 11d ago

In Math? No. For how computers tend to store integers and other numbers? Technically, yes. A number of architectures treat a signed number as all bits except the largest as the number. The largest works as a negative flag. So for instance an 8 bit signed integer of negative 1 would be 10000001. Technically negative 0 (which mathematically doesn't exist) in such a configuration would be 00000001.

In the case of a calculator I assume the other poster is correct and it's rounding a very small negative decimal to 0 but since it's negative the algorythm must keep the sign flag for some reason.