Do binary search
double guess = ( low + high ) / 2 ; while ( Math . Abs ( ( Math . Pow ( guess , n ) ) - x ) >= epsilon ) { if ( Math . Pow ( guess , n ) > x ) { high = guess ; } else { low = guess ; } guess = ( low + high ) / 2 ; } Console . WriteLine ( guess ) ; }