Function ADS::powMod

Function Documentation

inline U64 ADS::powMod(U64 x, U64 v, U64 m)

x^v mod m by repeated squaring, the products of Montgomery when m is odd

Pre:

m >= 1