Skip to content

Instantly share code, notes, and snippets.

@aeg
Created May 11, 2013 17:14
Show Gist options
  • Save aeg/5560649 to your computer and use it in GitHub Desktop.
Save aeg/5560649 to your computer and use it in GitHub Desktop.
累乗を計算する
// Case #1
// 2乗を計算する
// 5^2 = 25
// 引数も結果も Double
assert Math.pow(5, 2) == 25
// Case #2
// 累乗(N の M 乗)を計算する
// 2^10 = 1024
assert Math.pow(2, 10) == 1024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment