Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact

2020-03-31 Thread Joe Darcy
Hi Tagir, On 3/30/2020 9:00 PM, Tagir Valeev wrote: Hello! Speaking about implementation, how about this? return (a < 0) ? negateExact(a) : a; This would require only one branch for positive numbers and also will utilize already intrinsified negateExact. The cost is a less verbose message

Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact

2020-03-30 Thread Tagir Valeev
Hello! Speaking about implementation, how about this? return (a < 0) ? negateExact(a) : a; This would require only one branch for positive numbers and also will utilize already intrinsified negateExact. The cost is a less verbose message ("integer overflow" or "long overflow"). However, when

Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact

2020-03-30 Thread Chris Hegarty
> On 30 Mar 2020, at 18:53, Joe Darcy wrote: > > Hello, > > Updated webrev at: > > http://cr.openjdk.java.net/~darcy/8241374.1/ > LGTM. -Chris.

Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact

2020-03-30 Thread Brian Burkhalter
+1 Brian > On Mar 30, 2020, at 10:53 AM, Joe Darcy wrote: > > Updated webrev at: > > http://cr.openjdk.java.net/~darcy/8241374.1/ > > One of the four pieces of the update to discuss below. A few comments, I > added links from the abs

Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact

2020-03-30 Thread Joe Darcy
Hello, Updated webrev at:     http://cr.openjdk.java.net/~darcy/8241374.1/ One of the four pieces of the update to discuss below. A few comments, I added links from the abs methods to its sibling absExact method along with an additional note on referring the differing absExact behavior on a

Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact

2020-03-30 Thread Joe Darcy
Hi Brian and Chris, I was considering adding such as JLS link myself; I'll work one in and post a revised webrev. Thanks, -Joe On 3/30/2020 9:29 AM, Brian Burkhalter wrote: Hi Joe, On Mar 30, 2020, at 6:31 AM, Chris Hegarty > wrote: Full webrev for

Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact

2020-03-30 Thread Brian Burkhalter
Hi Joe, > On Mar 30, 2020, at 6:31 AM, Chris Hegarty wrote: > >> Full webrev for review include including tests: >> >>http://cr.openjdk.java.net/~darcy/8241374.0/ >> >> >> and the companion CSR: >> >>

Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact

2020-03-30 Thread Chris Hegarty
Joe, > On 29 Mar 2020, at 20:03, Joe Darcy wrote: > > Hi Stuart, > > Full webrev for review include including tests: > > http://cr.openjdk.java.net/~darcy/8241374.0/ > > and the companion CSR: > > https://bugs.openjdk.java.net/browse/JDK-8241805 Looks good to me. I do like the

Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact

2020-03-29 Thread Remi Forax
- Mail original - > De: "Stuart Marks" > À: "joe darcy" > Cc: "core-libs-dev" > Envoyé: Dimanche 29 Mars 2020 04:37:06 > Objet: Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact > Hi Joe, > > Overall this looks quite good

Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact

2020-03-29 Thread Joe Darcy
Hi Stuart, Full webrev for review include including tests:     http://cr.openjdk.java.net/~darcy/8241374.0/ and the companion CSR:     https://bugs.openjdk.java.net/browse/JDK-8241805 Replies interspersed below. On 3/28/2020 7:37 PM, Stuart Marks wrote: Hi Joe, Overall this looks quite

Re: JDK 15 RF(pre)R of JDK-8241374: add Math.absExact

2020-03-28 Thread Stuart Marks
Hi Joe, Overall this looks quite good. Thanks for being thorough about this; I certainly would have forgotten about StrictMath. :-) Since this is integer arithmetic, is it true that the StrictMath versions are identical to the Math versions? I have only a couple editorial quibbles. + *

JDK 15 RF(pre)R of JDK-8241374: add Math.absExact

2020-03-28 Thread Joe Darcy
Hello, Please review the initial proposed wording of the spec for     JDK-8241374: add Math.absExact The eventual wording needs to be replicated four times (Math.absExact(int), Math.absExact(long), StrictMath.absExact(int), StrictMath.absExact(long)) so I want to get the wording agreed to