



from collections.abc import Callable

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







def    lowerCAmelCase_  (lowerCAmelCase__:		Any		,	lowerCAmelCase__:		Tuple		,	lowerCAmelCase__:		Dict		,	):





			"""simple docstring"""


			UpperCAmelCase_:		List[str]       			=    float(__A     )
			while True:
						try:
									UpperCAmelCase_:		Optional[Any]       			=    prev_guess - function(__A     ) / derivative(__A     )
						except ZeroDivisionError:
									raise ZeroDivisionError("""Could not find root"""     ) from None
						if abs(prev_guess - next_guess     ) < 1_0**-5:
									return next_guess
						UpperCAmelCase_:		Tuple       			=    next_guess







def    lowerCAmelCase_  (lowerCAmelCase__:		Dict     ):





			"""simple docstring"""


			return (x**3) - (2 * x) - 5







def    lowerCAmelCase_  (lowerCAmelCase__:		Optional[Any]     ):





			"""simple docstring"""


			return 3 * (x**2) - 2


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











def    lowerCAmelCase_  (lowerCAmelCase__:		str     ):





			"""simple docstring"""


			return "".join(chr(ord(lowerCAmelCase__     ) + 3_2     ) if """A""" <= char <= """Z""" else char for char in word     )


if __name__ == "__main__":
	from doctest import testmod

	testmod()






