Update sqrt.java

Use long to avoid the dirty boundary checkings