Re: RFR: 8271601: Math.floorMod(int, int) and Math.floorMod(long, long) differ in their logic

2021-08-02 Thread Brian Burkhalter
On Mon, 2 Aug 2021 19:59:57 GMT, Raffaello Giulietti wrote: > Hello, > > please review this tiny change in the implementation of > j.l.Math.floorMod(int, int). > > While the results are unaffected, all of > floorDiv(int, int) > floorDiv(long, long) > floorMod(long, long) > use x

RFR: 8271601: Math.floorMod(int, int) and Math.floorMod(long, long) differ in their logic

2021-08-02 Thread Raffaello Giulietti
Hello, please review this tiny change in the implementation of j.l.Math.floorMod(int, int). While the results are unaffected, all of floorDiv(int, int) floorDiv(long, long) floorMod(long, long) use x ^ y in the tests to correct the result if needed. Not only is the proposed change