# HG changeset patch # User martin # Date 1592422198 25200 # Wed Jun 17 12:29:58 2020 -0700 # Node ID 2a342cba9cc895e516e9613db255c3753f1aeb32 # Parent 3be168f5cf1b0cc6385414e1368f6c612daed40f 8247782: typos in java.math Reviewed-by: rriggs, lancea, darcy diff --git a/src/java.base/share/classes/java/math/BigDecimal.java b/src/java.base/share/classes/java/math/BigDecimal.java --- a/src/java.base/share/classes/java/math/BigDecimal.java +++ b/src/java.base/share/classes/java/math/BigDecimal.java @@ -934,7 +934,7 @@ // At this point, val == sign * significand * 2**exponent. /* - * Special case zero to supress nonterminating normalization and bogus + * Special case zero to suppress nonterminating normalization and bogus * scale calculation. */ if (significand == 0) { @@ -4052,7 +4052,7 @@ pows[i] = pows[i - 1].multiply(BigInteger.TEN); } // Based on the following facts: - // 1. pows is a private local varible; + // 1. pows is a private local variable; // 2. the following store is a volatile store. // the newly created array elements can be safely published. BIG_TEN_POWERS_TABLE = pows; diff --git a/src/java.base/share/classes/java/math/BigInteger.java b/src/java.base/share/classes/java/math/BigInteger.java --- a/src/java.base/share/classes/java/math/BigInteger.java +++ b/src/java.base/share/classes/java/math/BigInteger.java @@ -2751,7 +2751,7 @@ BigInteger base2 = (this.signum < 0 || this.compareTo(m1) >= 0 ? this.mod(m1) : this); - // Caculate (base ** exponent) mod m1. + // Calculate (base ** exponent) mod m1. BigInteger a1 = (m1.equals(ONE) ? ZERO : base2.oddModPow(exponent, m1)); @@ -2905,7 +2905,7 @@ * This means that if you have a k-bit window, to compute n^z, * where z is the high k bits of the exponent, 1/2 of the time * it requires no squarings. 1/4 of the time, it requires 1 - * squaring, ... 1/2^(k-1) of the time, it reqires k-2 squarings. + * squaring, ... 1/2^(k-1) of the time, it requires k-2 squarings. * And the remaining 1/2^(k-1) of the time, the top k bits are a * 1 followed by k-1 0 bits, so it again only requires k-2 * squarings, not k-1. The average of these is 1. Add that