Skip to content

Commit cbe6da9

Browse files
committed
fix: PMD errors
1 parent 90c14f9 commit cbe6da9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/thealgorithms/maths/SolovayStrassenPrimalityTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ private static long calculateModularExponentiation(long base, long exponent, lon
4747
while (exponent > 0) {
4848
// If exponent is odd, multiply the current base (y) with x
4949
if (exponent % 2 == 1) {
50-
x = (x * y) % mod; // Update result with current base
50+
x = x * y % mod; // Update result with current base
5151
}
5252
// Square the base for the next iteration
53-
y = (y * y) % mod; // Update base to be y^2
53+
y = y * y % mod; // Update base to be y^2
5454
exponent = exponent / 2; // Halve the exponent for next iteration
5555
}
5656

0 commit comments

Comments
 (0)