﻿ Zero Divided by Zero

Zero Divided by Zero

Eugene McDonnell

International Business Machines Corporation
General Products Division
Palo Alto, California 94304

INTRODUCTION

Current implementations of APL give one as the result of zero divided by zero. This paper gives the reasons for proposing that this quotient be changed to zero. Two conventions introduced by K.E. Iverson  for the exposition of mathematical topics are used here. The first convention asserts the identity of two or more expressions by listing them one above the other. Thus:

```      a+b
b+a
```

asserts the commutativity of addition. The second convention allows the definition of a function to be given by listing the function name, a colon, and the expression defining the function, all on one line. The function argument for a monadic function is given by eitheror . The left argument for a dyadic function is given by , and the right argument by . Thus:

```      hyp:((⍺*2)+⍵*2)*.5
```

defines a function which gives the hypotenuse of a right triangle having legsand .

Divisors and Quotients

The number d is a divisor of a number m if there is an integer k for which m=k×d . k is called the quotient of m divided by d . Since 0=k×0 for all integers k , zero is a divisor of zero. Indeed, any number may be substituted for k , so that the choice of quotient for zero divided by zero is arbitrary. The quotient is said to be indeterminate.

Choosing a Quotient for Zero Divided by Zero

Although zero divided by zero is indeterminate, it is desirable to provide a fixed quotient for it in a programming environment, in order to reduce the number of circumstances when it is necessary to interrupt the execution of a problem. The current choice in APL for this quotient is one, based on the preservation of the identity:

```      z÷z
1
```

The behavior of z÷z as z approaches zero from any direction suggests that 1 is indeed a suitable quotient. This argument has the defect that an equally valid argument suggests that the limit of (a×z)÷b×z as z approaches zero is a÷b . In this sense, one has no better standing than any other number as the quotient. In fact, it is a poorer choice than zero, as the rest of this paper demonstrates.

THE CHOICE OF ZERO AS QUOTIENT OF ZERO DIVIDED BY ZERO

There is a conflict between the two following:

```      z÷z          0÷z
1            0
```

They cannot both be identities for all z . If the first is preserved, the second is lost, and vice-versa. Behind the first is the tautology z=z (since 1 is absorbed in multiplication). Behind the second is the more interesting equation (z×0)=0 , which expresses the fundamental multiplicative property of zero.

The Direction and Magnitude Functions

Consider the definition of a number as a directed magnitude. This implies the definition z=(×z)×|z , and gives the definitions for the direction (that is, signum) and magnitude functions as follows:

```      direction:⍵÷|⍵
magnitude:⍵÷×⍵
```

Observe that both of these definitions fail if 1 is the quotient of zero divided by zero, but both are true in the entire complex plane if zero is the quotient.

The Least Common Multiple Function

The definition of the least common multiple function is:

```      lcm:(⍺×⍵)÷⍺∨⍵
```

where ⍺∨⍵ is the greatest common divisor ofand . Since 0×0 is 0 , and 0∨0 is 0 , it is clear that the least common multiple of zero and zero is zero (in fact, zero is the only multiple of zero). If zero is the quotient of zero divided by zero, the definition for lcm holds universally. The current quotient causes the definition to fail.

Distributivity of Division over Addition

Consider the identity

```      (a÷c)+b÷c
(a+b)÷c
```

which expresses the distributivity of division over addition. The identity can be generalized to vectors:

```      +/v÷c
(+/v)÷c
```

Both identities fail using the present quotient, and succeed using the proposed quotient, when a , b , c , and the elements of v are all zero. Similarly, the function for the computation of the average of a vector v yields the identity:

```      +/v÷⍴v
(+/v)÷⍴v
```

which fails for v an empty vector, using the present quotient, but is preserved for the proposed quotient.

The Arc Function

In the complex plane, the arc function (whose result is known variously as the phase, amplitude, argument, or angle) of a number is:

```      arc:¯3○(im⍺)÷re⍺
```

where im and re are functions giving the real and the imaginary parts of a complex number. The arc function gives the implausible answer 0.7854 whenis zero, using the current quotient, but gives the more satisfactory answer zero, using the proposed quotient.

The Effect on the Dyadic Logarithm Function

The proposed definition requires a correlative change in the dyadic logarithm function:

```      dlog:(⍟⍵)÷⍟⍺
```

whenandare both 1. This points another conflict:

```      b⍟b          b⍟1
1            0
```

These cannot both be identities. The first is true universally under the current definition, even in the case 1⍟1 , but the second fails when b is 1. With the proposed change in the quotient of zero divided by zero, this situation will be reversed.

The Argument from Symmetry

With the real number line in view, the choice of some number other than zero as the quotient of zero divided by zero is not too obviously eccentric. With the complex plane in view, however, zero is seen to be the only symmetrical choice.

CONCLUSION

It is desirable to have a quotient for zero divided by zero. There are many persuasive arguments for wishing that quotient to be changed from its current definition of 1 to a new definition of zero.

ACKNOWLEDGMENTS

Jim Brown and Alex Morrow of IBM called my attention to the identity conflict concerning the average of an empty vector, and Hans Haegi of the Literargymnasium Zürich and Al Rose of Scientific Time Sharing both noted the identity conflict regarding the distributivity of division over addition.

REFERENCES

  Iverson, K.E., Elementary Analysis, draft of textbook submitted for publication.  McDonnell, E.E., “A Notation for the GCD and LCM Functions”, APL 75, Association for Computing Machinery, New York, 1975.

First appeared in the APL76 Conference Proceedings, 1976-09-22.

 created: 2009-09-24 11:10 updated: 2019-09-11 22:05