



"""simple docstring"""




import math
from collections.abc import Callable



def 	UpperCAmelCase__   (				A__	,    A__	,    A__   )      ->      Any:




   """simple docstring"""
   lowerCamelCase__						=			xa
   lowerCamelCase__						=			xa
   while True:
      if x_n == x_na or function(snake_case__   ) == function(snake_case__   ):
         raise ZeroDivisionError("float division by zero, could not find root"   )
      lowerCamelCase__						=			x_na - (
          function(snake_case__   ) / ((function(snake_case__   ) - function(snake_case__   )) / (x_na - x_n))
      )
      if abs(x_na - x_na   ) < 10**-5:
         return x_na
      lowerCamelCase__						=			x_na
      lowerCamelCase__						=			x_na



def 	UpperCAmelCase__   (				A__   )      ->      List[Any]:




   """simple docstring"""
   return math.pow(snake_case__	,    3   ) - (2 * x) - 5


if __name__ == "__main__":
     print(intersection(f, 3, 3.5))







"""simple docstring"""




def 	UpperCAmelCase__   (				A__   )      ->      list[int]:




   """simple docstring"""

   if length <= 0 or not isinstance(A__	,    A__   ):
      raise ValueError("Length must be a positive integer."   )
   return [n * (2 * n - 1) for n in range(A__   )]


if __name__ == "__main__":
     print(hexagonal_numbers(length=5))
     print(hexagonal_numbers(length=10))




