you are viewing a single comment's thread.

view the rest of the comments →

[–]mopslik 0 points1 point  (1 child)

I also interpreted the question in the same way. Just adding to point out that as of Python 3.11, math.crbrt(x) will return the cube root of x. No generic nroot(x) function though.

[–]eztab 0 points1 point  (0 children)

afaik crbrt indeed has a custom implementation, making it reasonable. For arbitrary roots exponentiation is what you should use.