



"""simple docstring"""
from collections.abc import Callable

__a           =							Callable[[float], float]  # type alias for a real -> real function
def   A_    (     _lowercase,   _lowercase,   _lowercase,   ):







						'''simple docstring'''


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







						'''simple docstring'''


						return (x**3) - (2 * x) - 5
def   A_    (     _lowercase      ):







						'''simple docstring'''


						return 3 * (x**2) - 2


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



def _a					(			SCREAMING_SNAKE_CASE						:     int						)       ->       int:

 """simple docstring"""






 return n * (2 * n - 1)







def _a					(			SCREAMING_SNAKE_CASE						:     int						)       ->       bool:

 """simple docstring"""






 __lowerCAmelCase:  List[Any]        = (1 + 24 * n) ** 0.5
 return ((1 + root) / 6) % 1 == 0







def _a					(			SCREAMING_SNAKE_CASE						:     int = 1_44						)       ->       int:

 """simple docstring"""






 __lowerCAmelCase:  Dict        = start
 __lowerCAmelCase:  List[str]        = hexagonal_num(SCREAMING_SNAKE_CASE						)
 while not is_pentagonal(SCREAMING_SNAKE_CASE						):
  n += 1
  __lowerCAmelCase:  Any        = hexagonal_num(SCREAMING_SNAKE_CASE						)
 return num


if __name__ == "__main__":
  print(f"{solution()} = ")





