CPKit
v1.6.1

Modular Exponentiation

OperatorsEasy

Compute modular powers (A^B) % M in logarithmic time steps.

Alt+Shift+8

Configuration Panel

Complexity Indices

Time ComplexityO(log(power))
Auxiliary SpaceO(1)
Conceptual Overview

Modular exponentiation calculates (base^power) % mod using binary exponentiation, which reduces multiplication steps to logarithmic limits.

Source: CP-Algorithms reference guide