Implement arbitrary nth root finding