On Wed, 7 Jul 2021 20:28:37 GMT, Brian Burkhalter <b...@openjdk.org> wrote:

> Please consider this change to make the `float` and `double` versions of 
> `java.lang.Math.abs()` branch-free.

Good catch. Well that’s not good. If it needs to catch a special case it’s 
probably not worth doing. given the small improvement for the general case. 
None of the existing tests catch this corner case.

On Jul 7, 2021, at 2:03 PM, Rémi Forax ***@***.******@***.***>> wrote:


Your patch change the semantics, actually
Math.abs(Integer.MIN_VALUE) == Integer.MIN_VALUE
with your patch
Math.abs(Integer.MIN_VALUE) == Integer.MAX_VALUE

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on 
GitHub<https://urldefense.com/v3/__https://github.com/openjdk/jdk/pull/4711*issuecomment-875931239__;Iw!!ACWV5N9M2RV99hQ!cfR3MocdWRA_0gP-3VpRbM_stXXf7VTtD7tPX9aQ07WkId8ihoEhwiCQ_wUCotsYgmlw$>,
 or 
unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ARBIJVLTH4NIS5WBNTXX26DTWS6KZANCNFSM477LZKTQ__;!!ACWV5N9M2RV99hQ!cfR3MocdWRA_0gP-3VpRbM_stXXf7VTtD7tPX9aQ07WkId8ihoEhwiCQ_wUCotXRvaVx$>.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4711

Reply via email to