Re: RFR: 8339934: Simplify Math.scalb(double) method [v2]

2024-09-13 Thread Joe Darcy
On Fri, 13 Sep 2024 18:56:35 GMT, Raffaello Giulietti wrote: > I considered using `powerOfTwoD` but it uses a `long` `+`, and performs an > additional masking which seems useless or over-cautious and does not help if > `n` is out of range (assuming the assert is not enabled). > > What about a

Re: RFR: 8339934: Simplify Math.scalb(double) method [v2]

2024-09-13 Thread Raffaello Giulietti
On Fri, 13 Sep 2024 18:44:36 GMT, Joe Darcy wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Slight improvement. > > src/java.base/share/classes/java/lang/Math.java line 3325: > >> 3323: if (scaleFac

Re: RFR: 8339934: Simplify Math.scalb(double) method [v2]

2024-09-13 Thread Joe Darcy
On Fri, 13 Sep 2024 08:56:39 GMT, Raffaello Giulietti wrote: >> `Math.scalb(double)` can be simplified, removing a loop and using >> larger/smaller factors. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Slight im

Re: RFR: 8339934: Simplify Math.scalb(double) method [v2]

2024-09-13 Thread Raffaello Giulietti
> `Math.scalb(double)` can be simplified, removing a loop and using > larger/smaller factors. Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision: Slight improvement. - Changes: - all: https://git.openjdk.org/jdk/pu