PowerMod |
Syntax |
PowerMod(A:INT,B:INT,M:INT):INT |
Description |
PowerMod(A,B,M)
is equal to Mod(A^B, M)
, but the former
is computed faster. B must be non-negative.
Example |
PowerMod(12345,41041,41041); -- 41041 is a Carmichael number 12345 ------------------------------- PowerMod(123456789,987654321,32003); -- cannot compute 123456789^987654321 directly 2332 ------------------------------- |