Logarithms also undo a fundamental arithmetic operation, exponentiation. Exponentiation and primality testing are primitive recursive. In mathematics, the logarithm is the inverse function to exponentiation. The definition of ordinal exponentiation for finite exponents is straightforward. Modular exponentiation can be done in polynomial time. There are three usual operations on ordinals&colon; addition, multiplication, and (ordinal) exponentiation. Their formulation used a shared-secret-key created from exponentiation of some number, modulo a prime number. PM defines analogues of addition, multiplication, and exponentiation for arbitrary relations. For example, forces addition to precede multiplication, and forces addition to precede exponentiation. Thus, each of the laws of exponentiation above has an analogue among laws of multiplication. Consider the example below of two simple integer exponentiation functions. Modular exponentiation is a type of exponentiation performed over a modulus. A second method to compute modular exponentiation requires more operations than the first method. Knowing the base and the modulus of exponentiation facilitates further optimizations. This example shows how to compute formula 14 using left to right binary exponentiation.