improve sqrt_binsearch