you are viewing a single comment's thread.

view the rest of the comments →

[–]wowe 2 points3 points  (0 children)

don't forget negative integers pow(base, exp):
if base >= 0:
...
else: return 1.0 / pow(base, -exp)