Guest User

Untitled

a guest
Oct 20th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.12 KB | None | 0 0
  1. let rec exp x n = match n with
  2. 0 -> 1
  3. | n when n mod 2 = 1 -> x*(x^((n-1)/2))^2
  4. | n when n mod 2 = 0 -> x^(n/2)^2
  5. ;;
Advertisement
Add Comment
Please, Sign In to add comment