Never has been allowed.  From the POPS for all integer divide instructions:

When the divisor is zero, or when the magnitudes of
the dividend and divisor are such that the quotient
cannot be expressed by a 32-bit signed binary integer,
a fixed-point-divide exception is recognized. This
includes the case of division of zero by zero.

For HFP divide it says:
When the divisor fraction is zero, an HFP-divide
exception is recognized. This includes the case of
division of zero by zero.

For BFP and DFP divide it says:
If the divisor is zero but the dividend is a finite number,
an IEEE-division-by-zero exception is recognized.
If the dividend and divisor are both zero, or if
both are infinity, regardless of sign, an IEEE-invalid operation
exception is recognized.

Chris Blaicher
Principal Software Engineer, Software Development
Syncsort Incorporated
50 Tice Boulevard, Woodcliff Lake, NJ 07677
P: 201-930-8260  |  M: 512-627-3803
E: [email protected]

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of Paul Gilmartin
Sent: Wednesday, October 23, 2013 7:31 PM
To: MVS List Server 2
Subject: Why is division by zero permitted?

On 2013-10-23 17:54, Kurt LeBesco wrote:
> I've been reading quietly and wondering how the dialog drifted off to
> rexx and pl1 land. Can we get back on topic? Thanks
>
OK.  Pure HLASM.  I've long wondered why division by zero is permitted in 
arithmetic expressions when otherwise overflows (even in division) are reported 
as errors.

The only rationale I can think of (and a poor one) is that it was initially an 
implementation oversight that was so rapidly codified by use that when it was 
discovered no repair was feasible.

-- gil

Reply via email to