Discuss Algorithm to compute x^n in O(log n) steps in the General Programming Help forum on Dev Articles. Algorithm to compute x^n in O(log n) steps General Programming Help forum discussing Perl, Python, Scripting and/or any languages that do not fit into any of the categories above.