Skip to content

Commit

Permalink
Update computer-science/algorithms/powers.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge Cuadra committed Jan 17, 2016
1 parent 5519bc7 commit 88609e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion computer-science/algorithms/powers.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
1. The base case $$n = 0$$, and $$x^0 = 1$$
2. If $$n$$ is positive compute recursively $$y=x^{(n/2)}$$
3. If $$n$$ is positive and odd, recursively compute $$x^{(n - 1)}$$
4. If $$n$$ is
4. If $$n$$ is negative, compute $$x^{-n}$$ until n is positive. Then $$x^n = 1/x^{-n}$$

## Implementation

Expand Down

0 comments on commit 88609e1

Please sign in to comment.