title: Fastest way to get the integer part of sqrt(n)?
body: <p>As we know if <code>n</code> is not a perfect square, then <code>sqrt(n)</code> would not be an integer. Since I need only the integer part, I feel that calling <code>sqrt(n)</code> wouldn't be that fast, as it takes time to calculate the fractional part also. </p>
  
  <p>So my question is, </p>
  
  <p>Can we get only the integer part of <em>sqrt(n)</em> without calculating the actual value of <code>sqrt(n)</code>? The algorithm should be faster than <code>sqrt(n)</code> (defined in <code>&lt;math.h&gt;</code> or <code>&lt;cmath&gt;</code>)?</p>
  
  <p>If possible, you can write the code in <code>asm</code> block also.</p>