Improved integer sqrt