Saturday, June 4, 2011


James Anderson once claimed "having solved a 1200 year old problem." The problem was 0/0. He gave this operation the value of Nullity. You see, if you ask a computer (or a mathematician), 1/0 is infinity, -1/0 is negative infinity, and 0/0 is not a number.

He then believed that designing computer hardware to actually handle infinities and 0/0 as numbers and not as exceptions would solve many cases of hardware and software crashes. The problem (at least as I see it) is that even if the software won't crash because of these numbers, you still have the problem that they aren't useful for standard practical computing purposes. This means that you'll have check to see if the result of your divisions came out as one of these special values, because they (probably) need to be handled differently from other numbers.

Normally, when you program, you should either 
  1. be certain that you won't perform division by zero (this is usually done by proving that it won't happen)
  2. or check to see if you will be dividing by zero and then handle it accordingly (usually by not dividing).
So you can either have specialized hardware that will do the operation, and you'll have check to see if something funny happens, or use the normal hardware and still check to see if something funny will happen. 

Either way, you're going to have to check something. This doesn't really solve anything.