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

lowercase__   			=      Callable[[float], float]  # type alias for a real -> real function







def 		__a  (      _SCREAMING_SNAKE_CASE						,	_SCREAMING_SNAKE_CASE						,	_SCREAMING_SNAKE_CASE						,	)      ->float:
  a__:	Optional[int]     				=      float(_SCREAMING_SNAKE_CASE  )
  while True:
    try:
      a__:	Optional[int]     				=      prev_guess - function(_SCREAMING_SNAKE_CASE  ) / derivative(_SCREAMING_SNAKE_CASE  )
    except ZeroDivisionError:
      raise ZeroDivisionError('Could not find root'  ) from None
    if abs(prev_guess - next_guess  ) < 10**-5:
      return next_guess
    a__:	Dict     				=      next_guess







def 		__a  (      _SCREAMING_SNAKE_CASE  )      ->float:
  return (x**3) - (2 * x) - 5







def 		__a  (      _SCREAMING_SNAKE_CASE  )      ->float:
  return 3 * (x**2) - 2


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



"""simple docstring"""
def 		__a  (      _SCREAMING_SNAKE_CASE = 100						,	_SCREAMING_SNAKE_CASE = 100  )      ->int:
  return max(
      sum(int(_SCREAMING_SNAKE_CASE  ) for x in str(base**power  )  )
      for base in range(_SCREAMING_SNAKE_CASE  )
      for power in range(_SCREAMING_SNAKE_CASE  )  )


# Tests
if __name__ == "__main__":
 import doctest

 doctest.testmod()


