Skip to content

Commit

Permalink
Slight improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
rgiulietti committed Sep 13, 2024
1 parent dce181b commit 2b7c706
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/java.base/share/classes/java/lang/Math.java
Original file line number Diff line number Diff line change
Expand Up @@ -3335,7 +3335,7 @@ public static double scalb(double d, int scaleFactor) {
if (scaleFactor > -2 * DoubleConsts.EXP_BIAS) {
return d * longBitsToDouble((long) (scaleFactor + 2 * DoubleConsts.EXP_BIAS) << PRECISION - 1) * F_DOWN;
}
if (scaleFactor > -3 * DoubleConsts.EXP_BIAS) {
if (scaleFactor > -2 * DoubleConsts.EXP_BIAS - PRECISION) {
return d * longBitsToDouble((long) (scaleFactor + 3 * DoubleConsts.EXP_BIAS) << PRECISION - 1) * F_DOWN * F_DOWN;
}
return d * MIN_VALUE * MIN_VALUE;
Expand Down

0 comments on commit 2b7c706

Please sign in to comment.