finish newton method for sqrt