On Fri, 13 Sep 2024 19:33:51 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:
>
> Introduce
> `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:
Introduce primPowerOfTwoD and make use of it.
-
Changes:
- all: http
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
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
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
> `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
On Wed, 11 Sep 2024 12:45:50 GMT, Raffaello Giulietti
wrote:
> `Math.scalb(double)` can be simplified, removing a loop and using
> larger/smaller factors.
The proposed implementation is even about 1.5x faster, but that's not the point
of this PR.
The point is to have simpler logic.
Similar lo
`Math.scalb(double)` can be simplified, removing a loop and using
larger/smaller factors.
-
Commit messages:
- 8339934: Simplify Math.scalb(double) method
Changes: https://git.openjdk.org/jdk/pull/20948/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20948&range=00
Issue