On Tue, 13 Jul 2021 17:21:52 GMT, Brian Burkhalter <[email protected]> wrote:
> Please consider this proposal to add `divideExact()` methods for integral
> data types to `java.lang.Math` thereby rounding out "exact" support to all
> four basic arithmetic operations.
Thanks. I was thinking of leveraging the `negateExact()` intrinsic instead:
// Leverage a potential intrinsic of negateExact()
return y == -1 ? Math.negateExact(x) : x/y;
-------------
PR: https://git.openjdk.java.net/jdk/pull/4770
