Fixed overflow bugs in ``_sqrt_mod1``
Merge pull request #2425 from pernici/pr2

Fixed overflow bugs in ``_sqrt_mod1``