RFR: 8339934: Simplify Math.scalb(double) method

Raffaello Giulietti rgiulietti at openjdk.org
Wed Sep 11 12:51:33 UTC 2024


On Wed, 11 Sep 2024 12:45:50 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> 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 logic could be adopted for the `float` case as well.

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

PR Comment: https://git.openjdk.org/jdk/pull/20948#issuecomment-2343578028


More information about the core-libs-dev mailing list