Here you can find things that interesting for me in programming at the moment
class powxy: def pow(self, x, n): if n == 0.0: return 1 if n < 0: n = -n x = 1/x if n % 2 == 0: return self.pow(x*x, int(n/2)) return x*self.pow(x*x, int(n/2))
No comments:
Post a Comment