powmod

fnUnqual!(Largest!(F, H)) powmod(F, G, H)(F x, G n, H m) if (isUnsigned!F && isUnsigned!G && isUnsigned!H)

Computes the value of a positive integer x, raised to the power n, modulo m.

Parameters

xbase
nexponent
mmodulus

Returns

x to the power n, modulo m.

The return type is the largest of x's and m's type.

The function requires that all values have unsigned types.