"Zero Divided by Zero" - a practical and reasoned approach (APL, 1976)

I do like the reasoned and logical tone of this paper (also here as PDF), from a 1976 APL conference:

From the paper

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.

…the choice of quotient for zero divided by zero is arbitrary. The quotient is said to be indeterminate

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

I had a quick go using the in-browser APL REPL at https://tryapl.org/ and it seems the proposal was not adopted, there at least - boo!

But… a 1981 paper by Murray Eisenberg references this one, and suggests a system variable to choose the behaviour.

And indeed it has come to pass, in Dyalog APL anyway,

⎕DIV←1

does the trick! (Except, yuck, it makes all divisions by zero return zero, which doesn’t seem like a good idea at all…)

via Wikipedia via Sumerian timesharing?:

1 Like

Ty! I’ll read it asap :))