News for hackers. Stuff that matters.
Re:One does not simply calculate the absolute value by MontyCarloHall on Sunday August 22, 2021 @04:47PM (#28269460)
No, those both yield +0.

0/(-x) would return -0, for all x > 0

Likewise, underflows on negative numbers would also return -0.

Re:One does not simply calculate the absolute value by thaumasiotes on Sunday August 22, 2021 @05:44PM (#28269946)
> 0/(-x) would return -0, for all x > 0

I find this one a little weird, but it seems to be true.

The more normal way to get -0 would be to divide a positive number by negative infinity, or a negative number by positive infinity.