Skip to content

Instantly share code, notes, and snippets.

@peace098beat
Created April 4, 2016 02:22
Show Gist options
  • Save peace098beat/94264bfa61cd32b92f537a301faf9ee2 to your computer and use it in GitHub Desktop.
Save peace098beat/94264bfa61cd32b92f537a301faf9ee2 to your computer and use it in GitHub Desktop.
累乗計算
** 累乗計算
def ruijou(self, x):
from numpy import log2, floor
y0 = log2(x)
# 最小t
p = floor(y0)
return int(2 ** p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment