Skip to content

Commit c08a4b8

Browse files
committed
Use mul instead of pow
1 parent a732598 commit c08a4b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vm/src/math_utils/is_prime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ mod with_no_std {
5151
}
5252

5353
for _ in 1..trials {
54-
result = result.pow(2) % n;
54+
result = &result * &result % n;
5555

5656
if result == BigUint::one() {
5757
return false;

0 commit comments

Comments
 (0)