Algorithm idea: Exponentiation by squaring

Edited by Andreas Muckenschnabel