Way OT, but does "algebra" recognize +/-0? Or is that just an artifact of packed notation (which is itself an artifact of Hollerith cards)?
What is -5 * 0 in fullword arithmetic? SURELY not -0. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Tony Harminc Sent: Wednesday, September 14, 2016 2:13 PM To: [email protected] Subject: Re: Bypassing s322 On 14 September 2016 at 16:34, Bill Woodger <[email protected]> wrote: > When IBM decided to use "character" comparisons where possible for numerics, > they had to ban the negative zero. > Although in a decimal compare a zero is zero, no matter how signed, in > a character compare it is not. Ergo -ve zero could not be allowed to > exist. (you can of course screw things up by being deliberate, but no > calculation in COBOL will ever generate a -ve zero result, nor will any > truncation). So in COBOL, +0 times -5 is +0, i.e the rules of algebra don't apply? The generated code must go out of its way to accomplish this. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
