Reputation: 13
I just want to raise a number to the power of 1/n. If I do this way: 2**(1/7), I alway get 1, regardless of n; and this only ocurrs when the dividen is 1.
Thanks in advance.
Upvotes: 1
Views: 747
Reputation: 5343
Run 1/7
in a console and see what you get.
Then try 1.0 / 7.0
, to avoid "integer division."
Upvotes: 4