add bin search for sqrt