title: Correct way to find nth root using pow() in c++
body: <p>I have to find nth root of numbers that can be as large as 10^18, with n as large as 10^4.<br>
  I know using pow() we can find the nth roots using,</p>
  
  <pre><code>x = (long int)(1e-7 + pow(number, 1.0 / n))
  </code></pre>
  
  <p>But this is giving wrong answers on online programming judges, but on all the cases i have taken, it is giving correct results. Is there something wrong with this method for the given constraints <br>
  Note: nth root here means the largest integer whose nth power is less than or equal to the given number, i.e., largest 'x' for which x^n &lt;= number.<br>
  Following the answers, i know this approach is wrong, then what is the way i should do it?</p>