Creates a function that raises a number to a power modulus another number. Is a fix for information loss due to extremely large numbers. It takes the modulus for every multiplication
Usage
exponentialMod(a,N)
Arguments
a
random number that is used as input to Shor's algorithm
N
Number that Shor's algorithm is to factor
Value
A function that takes argument x and returns a^x modulus N