what is 1 divided by 0?

A thread on webmaster world poses a question I had several months ago but never found a clear answer for.

The question is simple, but the answer is more complicated.

What is 1 divided by 0?

According to Google’s calculator, it’s 0, but I think they’re right out. The two answers I had found were infinity and undefined (or error).

As an experiment, I decided to try it on all the calculators I could get my hands on:

The unix desk calculator (dc): divide by zero
Gnome’s calculator (gnome-calculator): inf
KDE’s calculator (kcalc): error
My HP 48G: Error: infinite result
My palm pilot: error

So that’s 3 votes for error and 2 for infinity.

Next, I tried various programming languages:

Perl: Illegal division by zero
PHP: Division by zero
Bash shell: division by zero
C/C++: division by zero
Java: / by zero
Python: ZeroDivisionError: integer division or modulo by zero

With all 6 being errors, it looks like programmers have decided you’re not allowed to do it.

That makes a total of 9 votes for undefined (or error) and 2 votes for infinity, so undefined is the big winner.

If you’re still not satisfied, you can find more on the subject by searching Google for divide by zero.







Number of readers
- home
comics
news links
other links

about me
blog archives
docs
entertainment
experiences
funny lists
humor
intellectual
interests
metafilter
music
opinions
photos
web designs
tools
software
webmaster help

Sign up
Enter your email address to be notified of new posts



Search blog archives

Calendar
April 2005
S M T W T F S
« Mar   May »
 12
3456789
10111213141516
17181920212223
24252627282930







Random quote
(View all quotes)
"Experience keeps a dear school, but fools will learn in no other."










(?) Choose theme:  X X X X X X