bisection search to compute square root