On Wed, 2 Sep 2020 20:39:27 +0000, Robert Prins wrote: > >>> quotient = QUOTREM(dividend, divisor, remainder), >>> >>> With quotient and remainder generated in one go by the execution of a DP >>> instruction (and probably/possibly/maybe/likely also by the various other >>> divide instructions) >>> >>> https://www.ibm.com/developerworks/rfe/execute?use_case=viewRfe&CR_ID=145001 >>> >> Might this be better handled by an optimizing compiler's collapsing >> common expressions, benefiting existing code with no source change? > >Yes, obviously, but Enterprise PL/I doesn't seem to realise this when a >division >by a value is followed by a modulo(same-value). > But likewise: quotient = QUOTREM(dividend, divisor, remainder); doesn't exist. Either would require a compiler enhancement. I favor the technique that would benefit the most users with no changes to source code that might be incompatible with older compilers.
-- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN