





from collections.abc import Callable

UpperCAmelCase_       : int							=    Callable[[float], float]  # type alias for a real -> real function






def 				_lowerCAmelCase			(	_a :       RealFunc       , _a :       RealFunc       , _a :       int       , )						->      float:
     lowerCAmelCase_       :							Union[str, Any]			 =		float(_a      )
     while True:
          try:
               lowerCAmelCase_       :							List[Any]			 =		prev_guess - function(_a      ) / derivative(_a      )
          except ZeroDivisionError:
               raise ZeroDivisionError("""Could not find root"""      ) from None
          if abs(prev_guess - next_guess      ) < 10**-5:
               return next_guess
          lowerCAmelCase_       :							Any			 =		next_guess






def 				_lowerCAmelCase			(	_a :       float      )						->      float:
     return (x**3) - (2 * x) - 5






def 				_lowerCAmelCase			(	_a :       float      )						->      float:
     return 3 * (x**2) - 2


if __name__ == "__main__":
      print(newton(f, fa, 3))







def 				_lowerCAmelCase			(	_a :       str      )						->      int:
     lowerCAmelCase_       :							List[str]			 =		53_81
     for x in s:
          lowerCAmelCase_       :							Dict			 =		((hash_value << 5) + hash_value) + ord(_a      )
     return hash_value & 0XFFFFFFFF
