binary exponentiation

There's a total of 1 articles.

Binary Exponentiation → Read more...

Given two numbers $a$ and $n$ finding $a^n$ involves doing $n$ multiplications of $a$, however, it’s possible to do this in $log(n)$ operations by using binary exponentiation.