title: Safety of taking `int(numpy.sqrt(N))`
body: <p>Let's say I'm considering <code>M=N**2</code> where <code>N</code> is an integer.  It appears that <code>numpy.sqrt(M)</code> returns a float (actually numpy.float64).</p>
  
  <p>I could imagine that there could be a case where it returns, say, <code>N-10**(-16)</code> due to numerical precision issues, in which case <code>int(numpy.sqrt(M))</code> would be <code>N-1</code>.</p>
  
  <p>Nevertheless, my tests have <code>N==numpy.sqrt(M)</code> returning <code>True</code>, so it looks like this approximation isn't happening.</p>
  
  <p>Is it safe for me to assume that <code>int(numpy.sqrt(M))</code> is indeed accurate when <code>M</code> is a perfect square?  If so, for bonus, what's going on in the background that makes it work?</p>