BinaryPowerMethod(x,n) -- computes x^n using successive squaring
The technique depends in a standard way on the binary expansion of n, hence the name.
See also: