If 20 / 2 is 10, you can safely say that "2 * 10 = 20".

Now you say 20 / 0 = X. Therefore 0 * X = 20. What value of X will satisfy this statement.

None as 0 times anything = 0. Therefore X cannot exist. Dividing by zero does not exist or mathematically undefined.

Another practical example is thinking that division is basically just a set of subtraction operations.
Eg, 20 / 10 means start with 20, then subtract 2, and again, again until you reach 0. How many operations did it take? >> 10.

Now think about 20 / 0. Start with 20, then subtract 0, and again, and again. You now see why some people refer to dividing by 0 as infinity.

Not sure how a compiler goes about dealing with divisions by 0. BTW what is a compilers take on roots of negative numbers? In maths we can define imaginary numbers this way easily, but how would you in a programming language?

Last edited by DJBMASTER; 04/02/09 22:31.