Hollerith card compatibility.

A negative number on a punch card is indicated with a "11-row" overpunch.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Paul Gilmartin
Sent: Friday, August 4, 2017 8:54 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: "-0" (was: Someone just too smart ...?)

On Fri, 4 Aug 2017 17:06:52 +0200, Bernd Oppolzer wrote:
>
>IMO, the case for the RFE could be
>that programs that rely on the initialization of
>
>DCL SUM DEC FIXED (7) INIT (-0.1);
>
>with negative zero (X'0000000d')
>should be flagged; this is bad practice, and I would like such 
>initializations to be flagged as ERROR (not only warning) and to be 
>told by the error message, that the initialization will be POSITIVE 
>zero from now on. (Losing decimal digits to the right of the decimal 
>point should only be a warning, IMO).
> 
The designers of S/360 wisely avoided the "-0" silliness for fixed binary by 
choosing 2's complement ratner than the sign-magnitude used by the 7090.  This 
also avoids the need for a recomplement cycle dependent on the sign of the 
result.

It would have been wiser to make the packed representation 10's complement 
rather than sign-magnitude for similar reasons:
o No "-0".
o Five times the range in the same storage.
o Never a need for a recomplement cycle.

I am not much swayed by the opposing arguments:
o FORTRAN II relied on "-0" to indicate a blank input field.
o Sign-magnitude is more legible than complement in a dump.
o Some theorems in numerical analysis depend on symmetric range.
o Possible overflow complementing a numbe is harmful.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to