## RE: [PrimeNumbers] Positive / negative zero

Expand Messages
• ... Ah, another question which has my favourite answer: it depends. The IEEE floating point standard has an encoding where the two infinities are distinguished
Message 1 of 3 , Dec 1, 2001
> If there is a positive infinity and a negative infinity, isn't there a
> positive zero and a negative zero, the reciprocals of the infinities?

Ah, another question which has my favourite answer: it depends.

The IEEE floating point standard has an encoding where the two
infinities are distinguished by having a one-bit difference between
them: the sign bit. In this mode, there are two encodings of zero
which are distinguished in the same way. The obvious identities are
then preserved when doing arithmetic on these quantities. However, -0
compares equal to +0 and an interesting philosophical question arises as
to how they differ when they are equal!

In mathematics, we often come across limits which are taken as some
quantity tends to zero from above or below. These limiting values could
reasonably be taken as definitions of +0 and -0. Although the limiting
values themselves are equal, the limiting values of the expression need
not be the same or, for that matter, equal to the value of the
expression at zero. For an example, consider the sign(x) function which
is -1 for negative x, 0 for x=0 and +1 for positive x.

Paul
Your message has been successfully submitted and would be delivered to recipients shortly.