On 09/15/2016 01:02 AM, Bill Woodger wrote: > It is not so much what I mean, as what the Principles of Operations means. > > "The sign of the product is determined by the rules of algebra from the > multiplier and multiplicand signs, even if one or both operands are zeros." > > It is the old "two negatives make a positive, two positives make a positive, > positive and negative make a negative" that you learned at school just to > know the sign of the result. > > There is no reference to zero in the "rules of algebra" as remembered from > around 45 years ago, we should have asked at the time. > > Perhaps a bit of code on the chip to say "negative zero, I'm not having that, > become positive" would be pointless overhead? > > Divide says, in a note on an example, "Because the dividend and divisor have > different signs, the quotient receives a negative sign." > > Addition and subtraction have no such rule, so zero is just (positive) zero > out of those. > > So, Enterprise COBOL is wont at add a "ZAP-to-itself" when there is a danger > that a result field (from calculation or truncation) may have produced a > negative zero. More precisely the PoP should have said "by the rules of algebra from the multiplier and multiplicand signs for a nonzero result and setting the sign in a similar manner even if one or both operands are zeros". Yeah, we can tell what they mean, but the wording is imprecise whether they meant to imply that the rules of algebra address the zero case or that they are just extending those rules as if the result were nonzero. Since the rules of algebra don't associate any sign with zero, the latter interpretation is the only reasonable one. Joel C. Ewing
-- Joel C. Ewing, Bentonville, AR jcew...@acm.org ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN