






from collections.abc import Callable

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






def    UpperCAmelCase__	(						lowerCamelCase  : RealFunc ,lowerCamelCase  : RealFunc ,lowerCamelCase  : int ,):
   lowerCamelCase											=float(lowerCamelCase						)
   while True:
      try:
         lowerCamelCase											=prev_guess - function(lowerCamelCase						) / derivative(lowerCamelCase						)
      except ZeroDivisionError:
         raise ZeroDivisionError("""Could not find root"""						) from None
      if abs(prev_guess - next_guess						) < 10**-5:
         return next_guess
      lowerCamelCase											=next_guess






def    UpperCAmelCase__	(						lowerCamelCase  : float						):
   return (x**3) - (2 * x) - 5






def    UpperCAmelCase__	(						lowerCamelCase  : float						):
   return 3 * (x**2) - 2


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







from typing import TYPE_CHECKING

from ...utils import _LazyModule


_UpperCAmelCase				:	Dict    						=    {'tokenization_bert_japanese': ['BertJapaneseTokenizer', 'CharacterTokenizer', 'MecabTokenizer']}


if TYPE_CHECKING:
   from .tokenization_bert_japanese import BertJapaneseTokenizer, CharacterTokenizer, MecabTokenizer

else:
   import sys

   _UpperCAmelCase				:	Tuple    						=    _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)