<s>
In	O
mathematics	O
,	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
is	O
division	O
where	O
the	O
divisor	O
(	O
denominator	O
)	O
is	O
zero	O
.	O
</s>
<s>
In	O
ordinary	O
arithmetic	O
,	O
the	O
expression	O
has	O
no	O
meaning	O
,	O
as	O
there	O
is	O
no	O
number	O
that	O
,	O
when	O
multiplied	O
by	O
,	O
gives	O
(	O
assuming	O
)	O
;	O
thus	O
,	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
is	O
undefined	O
(	O
a	O
type	O
of	O
singularity	O
)	O
.	O
</s>
<s>
Since	O
any	O
number	O
multiplied	O
by	O
zero	O
is	O
zero	O
,	O
the	O
expression	O
is	O
also	O
undefined	O
;	O
when	O
it	O
is	O
the	O
form	O
of	O
a	O
limit	B-Algorithm
,	O
it	O
is	O
an	O
indeterminate	B-Algorithm
form	I-Algorithm
.	O
</s>
<s>
In	O
computing	O
,	O
a	O
program	B-General_Concept
error	I-General_Concept
may	O
result	O
from	O
an	O
attempt	O
to	O
divide	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
.	O
</s>
<s>
Depending	O
on	O
the	O
programming	O
environment	O
and	O
the	O
type	O
of	O
number	O
(	O
e.g.	O
,	O
floating	B-Algorithm
point	I-Algorithm
,	O
integer	O
)	O
being	O
divided	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
,	O
it	O
may	O
generate	O
positive	O
or	O
negative	O
infinity	B-Application
by	O
the	O
IEEE	O
754	O
floating-point	B-Algorithm
standard	O
,	O
generate	O
an	O
exception	B-General_Concept
,	O
generate	O
an	O
error	B-Error_Name
message	I-Error_Name
,	O
cause	O
the	O
program	O
to	O
terminate	O
,	O
result	O
in	O
a	O
special	O
not-a-number	O
value	O
,	O
or	O
crash	B-General_Concept
.	O
</s>
<s>
So	O
,	O
for	O
dividing	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
,	O
what	O
is	O
the	O
number	O
of	O
cookies	O
that	O
each	O
person	O
receives	O
when	O
10	O
cookies	O
are	O
evenly	O
distributed	O
among	O
0	O
people	O
at	O
a	O
table	O
?	O
</s>
<s>
In	O
elementary	O
algebra	O
,	O
another	O
way	O
of	O
looking	O
at	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
is	O
that	O
division	O
can	O
always	O
be	O
checked	O
using	O
multiplication	O
.	O
</s>
<s>
Considering	O
the	O
example	O
above	O
,	O
setting	O
x	O
=	O
,	O
if	O
x	O
equals	O
ten	O
divided	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
,	O
then	O
x	O
times	O
zero	O
equals	O
ten	O
,	O
but	O
there	O
is	O
no	O
x	O
that	O
,	O
when	O
multiplied	O
by	O
zero	O
,	O
gives	O
ten	O
(	O
or	O
any	O
number	O
other	O
than	O
zero	O
)	O
.	O
</s>
<s>
The	O
author	O
could	O
not	O
explain	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
in	O
his	O
texts	O
:	O
his	O
definition	O
can	O
be	O
easily	O
proven	O
to	O
lead	O
to	O
algebraic	O
absurdities	O
.	O
</s>
<s>
A	O
positive	O
or	O
negative	O
number	O
when	O
divided	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
is	O
a	O
fraction	O
with	O
the	O
zero	O
as	O
denominator	O
.	O
</s>
<s>
Zero	B-Algorithm
divided	I-Algorithm
by	I-Algorithm
zero	I-Algorithm
is	O
zero	O
.	O
</s>
<s>
Loosely	O
speaking	O
,	O
since	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
has	O
no	O
meaning	O
(	O
is	O
undefined	O
)	O
in	O
the	O
whole	O
number	O
setting	O
,	O
this	O
remains	O
true	O
as	O
the	O
setting	O
expands	O
to	O
the	O
real	O
or	O
even	O
complex	O
numbers	O
.	O
</s>
<s>
In	O
keeping	O
with	O
this	O
change	O
of	O
viewpoint	O
,	O
the	O
question	O
,	O
"	O
Why	O
ca	O
n't	O
we	O
divide	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
?	O
</s>
<s>
"	O
,	O
becomes	O
"	O
Why	O
ca	O
n't	O
a	O
rational	O
number	O
have	O
a	O
zero	B-Algorithm
denominator	I-Algorithm
?	O
"	O
.	O
</s>
<s>
The	O
above	O
explanation	O
may	O
be	O
too	O
abstract	O
and	O
technical	O
for	O
many	O
purposes	O
,	O
but	O
if	O
one	O
assumes	O
the	O
existence	O
and	O
properties	O
of	O
the	O
rational	O
numbers	O
,	O
as	O
is	O
commonly	O
done	O
in	O
elementary	O
mathematics	O
,	O
the	O
"	O
reason	O
"	O
that	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
is	O
not	O
allowed	O
is	O
hidden	O
from	O
view	O
.	O
</s>
<s>
A	O
compelling	O
reason	O
for	O
not	O
allowing	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
is	O
that	O
,	O
if	O
it	O
were	O
allowed	O
,	O
many	O
absurd	O
results	O
(	O
i.e.	O
,	O
fallacies	O
)	O
would	O
arise	O
.	O
</s>
<s>
When	O
working	O
with	O
numerical	O
quantities	O
it	O
is	O
easy	O
to	O
determine	O
when	O
an	O
illegal	O
attempt	O
to	O
divide	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
is	O
being	O
made	O
.	O
</s>
<s>
However	O
,	O
it	O
is	O
possible	O
to	O
disguise	O
a	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
in	O
an	O
algebraic	O
argument	O
,	O
leading	O
to	O
invalid	O
proofs	O
that	O
,	O
for	O
instance	O
,	O
such	O
as	O
the	O
following	O
:	O
</s>
<s>
The	O
disguised	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
occurs	O
since	O
when	O
.	O
</s>
<s>
At	O
first	O
glance	O
it	O
seems	O
possible	O
to	O
define	O
a/0	B-Algorithm
by	O
considering	O
the	O
limit	B-Algorithm
of	O
a/b	O
as	O
b	O
approaches	O
0	O
.	O
</s>
<s>
and	O
so	O
the	O
is	O
undefined	O
(	O
the	O
limit	B-Algorithm
is	O
also	O
undefined	O
for	O
negative	O
a	O
)	O
.	O
</s>
<s>
Furthermore	O
,	O
there	O
is	O
no	O
obvious	O
definition	O
of	O
0/0	O
that	O
can	O
be	O
derived	O
from	O
considering	O
the	O
limit	B-Algorithm
of	O
a	O
ratio	O
.	O
</s>
<s>
and	O
so	O
the	O
limit	B-Algorithm
exists	O
,	O
and	O
is	O
equal	O
to	O
.	O
</s>
<s>
These	O
and	O
other	O
similar	O
facts	O
show	O
that	O
the	O
expression	O
cannot	O
be	O
well-defined	O
as	O
a	O
limit	B-Algorithm
.	O
</s>
<s>
Thus	O
,	O
it	O
is	O
sometimes	O
useful	O
to	O
think	O
of	O
a/0	B-Algorithm
,	O
where	O
a≠0	O
,	O
as	O
being	O
.	O
</s>
<s>
This	O
infinity	B-Application
can	O
be	O
either	O
positive	O
,	O
negative	O
,	O
or	O
unsigned	O
,	O
depending	O
on	O
context	O
.	O
</s>
<s>
Since	O
the	O
one-sided	B-Algorithm
limits	I-Algorithm
are	O
different	O
,	O
the	O
two-sided	O
limit	B-Algorithm
does	O
not	O
exist	O
in	O
the	O
standard	O
framework	O
of	O
the	O
real	O
numbers	O
.	O
</s>
<s>
Here	O
means	O
an	O
unsigned	O
infinity	B-Application
or	O
point	O
at	O
infinity	B-Application
,	O
an	O
infinite	O
quantity	O
that	O
is	O
neither	O
positive	O
nor	O
negative	O
.	O
</s>
<s>
It	O
is	O
the	O
natural	O
way	O
to	O
view	O
the	O
range	O
of	O
the	O
tangent	O
function	O
and	O
cotangent	O
functions	O
of	O
trigonometry	O
:	O
approaches	O
the	O
single	O
point	O
at	O
infinity	B-Application
as	O
approaches	O
either	O
or	O
from	O
either	O
direction	O
.	O
</s>
<s>
Here	O
represents	O
complex	O
infinity	B-Application
,	O
which	O
is	O
also	O
a	O
point	O
at	O
infinity	B-Application
.	O
</s>
<s>
Although	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
cannot	O
be	O
sensibly	O
defined	O
with	O
real	O
numbers	O
and	O
integers	O
,	O
it	O
is	O
possible	O
to	O
consistently	O
define	O
it	O
,	O
or	O
similar	O
operations	O
,	O
in	O
other	O
mathematical	O
structures	O
.	O
</s>
<s>
In	O
the	O
hyperreal	O
numbers	O
and	O
the	O
surreal	O
numbers	O
,	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
is	O
still	O
impossible	O
,	O
but	O
division	O
by	O
non-zero	O
infinitesimals	O
is	O
possible	O
.	O
</s>
<s>
In	O
matrix	B-Architecture
algebra	O
(	O
or	O
linear	B-Language
algebra	I-Language
in	O
general	O
)	O
,	O
one	O
can	O
define	O
a	O
pseudo-division	O
,	O
by	O
setting	O
a/b	O
=	O
ab+	O
,	O
in	O
which	O
b+	O
represents	O
the	O
pseudoinverse	O
of	O
b	O
.	O
</s>
<s>
However	O
,	O
the	O
localization	O
of	O
every	O
commutative	O
ring	O
at	O
zero	O
is	O
the	O
trivial	O
ring	O
,	O
where	O
,	O
so	O
nontrivial	O
commutative	O
rings	O
do	O
not	O
have	O
inverses	O
at	O
zero	O
,	O
and	O
thus	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
is	O
undefined	O
for	O
nontrivial	O
commutative	O
rings	O
.	O
</s>
<s>
Nevertheless	O
,	O
any	O
number	O
system	O
that	O
forms	O
a	O
commutative	O
ring	O
can	O
be	O
extended	O
to	O
a	O
seldom	O
used	O
structure	O
called	O
a	O
wheel	O
in	O
which	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
is	O
always	O
possible	O
.	O
</s>
<s>
In	O
a	O
field	O
,	O
every	O
nonzero	O
element	O
is	O
invertible	O
under	O
multiplication	O
;	O
as	O
above	O
,	O
division	O
poses	O
problems	O
only	O
when	O
attempting	O
to	O
divide	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
.	O
</s>
<s>
In	O
the	O
zero	O
ring	O
,	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
is	O
possible	O
,	O
which	O
shows	O
that	O
the	O
other	O
field	O
axioms	O
are	O
not	O
sufficient	O
to	O
exclude	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
in	O
a	O
field	O
.	O
</s>
<s>
The	O
IEEE	O
floating-point	B-Algorithm
standard	O
,	O
supported	O
by	O
almost	O
all	O
modern	O
floating-point	B-General_Concept
units	I-General_Concept
,	O
specifies	O
that	O
every	O
floating-point	B-Algorithm
arithmetic	I-Algorithm
operation	O
,	O
including	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
,	O
has	O
a	O
well-defined	O
result	O
.	O
</s>
<s>
The	O
standard	O
supports	O
signed	B-Algorithm
zero	I-Algorithm
,	O
as	O
well	O
as	O
infinity	B-Application
and	O
NaN	O
(	O
not	O
a	O
number	O
)	O
.	O
</s>
<s>
There	O
are	O
two	O
zeroes	O
:	O
+0	B-Algorithm
(	O
positive	O
zero	O
)	O
and	O
−0	B-Algorithm
(	O
negative	B-Algorithm
zero	I-Algorithm
)	O
and	O
this	O
removes	O
any	O
ambiguity	O
when	O
dividing	O
.	O
</s>
<s>
In	O
IEEE	O
754	O
arithmetic	O
,	O
a÷+0	O
is	O
positive	O
infinity	B-Application
when	O
a	O
is	O
positive	O
,	O
negative	O
infinity	B-Application
when	O
a	O
is	O
negative	O
,	O
and	O
NaN	O
when	O
a	O
=	O
±0	O
.	O
</s>
<s>
The	O
infinity	B-Application
signs	O
change	O
when	O
dividing	O
by	O
−0	B-Algorithm
instead	O
.	O
</s>
<s>
The	O
justification	O
for	O
this	O
definition	O
is	O
to	O
preserve	O
the	O
sign	O
of	O
the	O
result	O
in	O
case	O
of	O
arithmetic	B-Algorithm
underflow	I-Algorithm
.	O
</s>
<s>
For	O
example	O
,	O
in	O
the	O
single-precision	O
computation	O
1/	O
(	O
x/2	O
)	O
,	O
where	O
,	O
the	O
computation	O
x/2	O
underflows	B-Algorithm
and	O
produces	O
±0	O
with	O
sign	O
matching	O
x	O
,	O
and	O
the	O
result	O
will	O
be	O
±∞	O
with	O
sign	O
matching	O
x	O
.	O
</s>
<s>
The	O
sign	O
will	O
match	O
that	O
of	O
the	O
exact	O
result	O
±2150	O
,	O
but	O
the	O
magnitude	O
of	O
the	O
exact	O
result	O
is	O
too	O
large	O
to	O
represent	O
,	O
so	O
infinity	B-Application
is	O
used	O
to	O
indicate	O
overflow.Integer	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
is	O
usually	O
handled	O
differently	O
from	O
floating	B-Algorithm
point	I-Algorithm
since	O
there	O
is	O
no	O
integer	O
representation	O
for	O
the	O
result	O
.	O
</s>
<s>
Some	O
processors	O
generate	O
an	O
exception	B-General_Concept
when	O
an	O
attempt	O
is	O
made	O
to	O
divide	O
an	O
integer	O
by	O
zero	O
,	O
although	O
others	O
will	O
simply	O
continue	O
and	O
generate	O
an	O
incorrect	O
result	O
for	O
the	O
division	O
.	O
</s>
<s>
Because	O
of	O
the	O
improper	O
algebraic	O
results	O
of	O
assigning	O
any	O
value	O
to	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
,	O
many	O
computer	B-General_Concept
programming	I-General_Concept
languages	O
(	O
including	O
those	O
used	O
by	O
calculators	B-Application
)	O
explicitly	O
forbid	O
the	O
execution	O
of	O
the	O
operation	O
and	O
may	O
prematurely	O
halt	O
a	O
program	O
that	O
attempts	O
it	O
,	O
sometimes	O
reporting	O
a	O
"	O
Divide	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
"	O
error	O
.	O
</s>
<s>
In	O
these	O
cases	O
,	O
if	O
some	O
special	O
behavior	O
is	O
desired	O
for	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
,	O
the	O
condition	O
must	O
be	O
explicitly	O
tested	O
(	O
for	O
example	O
,	O
using	O
an	O
if	O
statement	O
)	O
.	O
</s>
<s>
Some	O
programs	O
(	O
especially	O
those	O
that	O
use	O
fixed-point	O
arithmetic	O
where	O
no	O
dedicated	O
floating-point	B-Algorithm
hardware	O
is	O
available	O
)	O
will	O
use	O
behavior	O
similar	O
to	O
the	O
IEEE	O
standard	O
,	O
using	O
large	O
positive	O
and	O
negative	O
numbers	O
to	O
approximate	O
infinities	O
.	O
</s>
<s>
In	O
some	O
programming	O
languages	O
,	O
an	O
attempt	O
to	O
divide	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
results	O
in	O
undefined	B-Language
behavior	I-Language
.	O
</s>
<s>
The	O
graphical	O
programming	O
language	O
Scratch	B-Language
2.0	I-Language
and	I-Language
3.0	I-Language
used	O
in	O
many	O
schools	O
returns	O
Infinity	B-Application
or	O
−Infinity	O
depending	O
on	O
the	O
sign	O
of	O
the	O
dividend	O
.	O
</s>
<s>
In	O
two	B-General_Concept
's	I-General_Concept
complement	I-General_Concept
arithmetic	I-General_Concept
,	O
attempts	O
to	O
divide	O
the	O
smallest	O
signed	O
integer	O
by	O
−1	O
are	O
attended	O
by	O
similar	O
problems	O
,	O
and	O
are	O
handled	O
with	O
the	O
same	O
range	O
of	O
solutions	O
,	O
from	O
explicit	O
error	O
conditions	O
to	O
undefined	B-Language
behavior	I-Language
.	O
</s>
<s>
Most	O
calculators	B-Application
will	O
either	O
return	O
an	O
error	O
or	O
state	O
that	O
1/0	B-Algorithm
is	O
undefined	O
;	O
however	O
,	O
some	O
TI	O
and	O
HP	O
graphing	O
calculators	B-Application
will	O
evaluate	O
(	O
1/0	B-Algorithm
)	O
2	O
to	O
∞	O
.	O
</s>
<s>
Microsoft	B-Application
Math	I-Application
and	O
Mathematica	B-Language
return	O
ComplexInfinity	O
for	O
1/0	B-Algorithm
.	O
</s>
<s>
Maple	B-Language
and	O
SageMath	B-Application
return	O
an	O
error	B-Error_Name
message	I-Error_Name
for	O
1/0	B-Algorithm
,	O
and	O
infinity	B-Application
for	O
1/0.0	O
(	O
0.0	O
tells	O
these	O
systems	O
to	O
use	O
floating-point	B-Algorithm
arithmetic	I-Algorithm
instead	O
of	O
algebraic	O
arithmetic	O
)	O
.	O
</s>
<s>
Some	O
modern	O
calculators	B-Application
allow	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
in	O
special	O
cases	O
,	O
where	O
it	O
will	O
be	O
useful	O
to	O
students	O
and	O
,	O
presumably	O
,	O
understood	O
in	O
context	O
by	O
mathematicians	O
.	O
</s>
<s>
Some	O
calculators	B-Application
,	O
the	O
online	O
Desmos	B-Language
calculator	I-Language
is	O
one	O
example	O
,	O
allow	O
arctangent( 	O
1/0	B-Algorithm
)	O
.	O
</s>
<s>
Students	O
are	O
often	O
taught	O
that	O
the	O
inverse	O
cotangent	O
function	O
,	O
arccotangent	O
,	O
should	O
be	O
calculated	O
by	O
taking	O
the	O
arctangent	O
of	O
the	O
reciprocal	O
,	O
and	O
so	O
a	O
calculator	B-Application
may	O
allow	O
arctangent( 	O
1/0	B-Algorithm
)	O
,	O
giving	O
the	O
output	O
which	O
is	O
the	O
correct	O
value	O
of	O
arccotangent	O
0	O
.	O
</s>
<s>
On	O
September	O
21	O
,	O
1997	O
,	O
a	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
error	I-Algorithm
in	O
the	O
"	O
Remote	O
Data	O
Base	O
Manager	O
"	O
aboard	O
USS	O
Yorktown	O
(	O
CG-48	O
)	O
brought	O
down	O
all	O
the	O
machines	O
on	O
the	O
network	O
,	O
causing	O
the	O
ship	O
's	O
propulsion	O
system	O
to	O
fail	O
.	O
</s>
