aboutsummaryrefslogtreecommitdiff
path: root/src/java.base/share/classes/java/math/BigInteger.java
diff options
context:
space:
mode:
authorMartin Buchholz <martin@openjdk.org>2020-06-17 12:29:58 -0700
committerMartin Buchholz <martin@openjdk.org>2020-06-17 12:29:58 -0700
commit4f2edacaafac2c6d87cbb0e9869e3da8d01e76f4 (patch)
tree36c47c1c6e7f8cf25d1a46d0f8077da7a8228e19 /src/java.base/share/classes/java/math/BigInteger.java
parent34c79640e76c001e9f316f9aaba49dbe227bbae7 (diff)
downloadopenjdk-4f2edacaafac2c6d87cbb0e9869e3da8d01e76f4.tar.gz
openjdk-4f2edacaafac2c6d87cbb0e9869e3da8d01e76f4.zip
8247782: typos in java.math
Reviewed-by: rriggs, lancea, darcy
Diffstat (limited to 'src/java.base/share/classes/java/math/BigInteger.java')
-rw-r--r--src/java.base/share/classes/java/math/BigInteger.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/java.base/share/classes/java/math/BigInteger.java b/src/java.base/share/classes/java/math/BigInteger.java
index 9ed191da06b..61935f5c05d 100644
--- a/src/java.base/share/classes/java/math/BigInteger.java
+++ b/src/java.base/share/classes/java/math/BigInteger.java
@@ -2751,7 +2751,7 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
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 @@ public class BigInteger extends Number implements Comparable<BigInteger> {
* 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