How to compute the nth root of a very big integer
If it’s a REALLY big number. You could use a binary search. def find_invpow(x,n): “””Finds the integer component of the n’th root of x, an integer such that y ** n <= x < (y + 1) ** n. “”” high = 1 while high ** n <= x: high *= 2 low = high/2 … Read more