Monday, February 22, 2010

Zero's signs

Maths begins with 1, 2, 3, and so forth; and a natural next step is to include fractions, and at some point we include 0 and negative numbers. In my last post I wondered if the adjunction of negative numbers should be construed as the introduction of directions. If so then when we include negative numbers we should also be exchanging our original unsigned numbers for explicitly positive numbers (the unsigned amount in the positive direction), but the question then arises of what we should do with 0. There is no numerical difference between negative zero and positive zero, both are just zero, and so we might leave 0 unsigned; but in my 2005 paper I presumed (on page 99) that 0 could be assigned both directions (and that in the case of complex numbers, 0 could have all the infinitely many directions of the complex plane). Intuitions for both views come from the use of 0 to label the origin of geometrical coordinates: To get to 0 from 0 we don't actually go in any direction; but then, to get to 0 from 0 we could travel no distance in any direction. So I'm wondering if there are any good reasons to favour one view over the other (aside from my 2005, which is a reason to favour the latter).
(PS: This post is linked to in the Carnival of Mathematics 63:)

1 comment:

JoelKatz said...

There is one good reason to assign zero a sign -- when the zero arises in a manner that suggests a sign.

For example, in computer number encoding schemes, you might take the smallest encodable positive number and divide it by five. It may make sense to call the result +0. Similarly, if you take the smallest encodable negative number and divide it by 5, it may make sense to call the result -0.

Generally you have a sign bit anyway, so in most encoding schemes (other than those for integers), this is free. In most models -0 tests equal to +0, though this is sometimes made optional.

These models also frequently have codings for positive and negative infinity. 1/+0 is +inf. 1/-0 is -inf. In most models, -inf and +inf do not test equal.

Guess what they do for +0/+0.