This post was written by Ethan Hein.
When you learned division in school, the teacher probably brushed off the issue of dividing by zero in one sentence: you can’t do it, moving on. You might feel like you got shortchanged by that explanation. Why not? What happens when you divide by zero?
You can’t ask the computer. Computers fail when you ask them questions with no unambiguous answer. Dividing by zero is just such a question. Folklore suggests that asking the computer to divide by zero makes it spectacularly explode or something. In reality, it returns an error message or the reply Not A Number, or it gives a wrong answer, or the program terminates, or sometimes the machine falls into an infinite loop.







