Binary Search+Math+Newton's method--Sqrt(x)--Java + Scala version