




'''simple docstring'''





from .hash_table import HashTable
from .number_theory.prime_numbers import is_prime, next_prime


class     UpperCamelCase					(  snake_case__					):



  def __init__( self		,    *__lowerCAmelCase		,    **__lowerCAmelCase   ):







      '''simple docstring'''


      super().__init__(*__lowerCAmelCase		,    **__lowerCAmelCase   )



  def 						a_       ( self		,    __lowerCAmelCase		,    __lowerCAmelCase   ):







      '''simple docstring'''


      _a							:       Optional[int]       					=			(
          next_prime(value % self.size_table   )
          if not is_prime(value % self.size_table   )
          else value % self.size_table
      )  # gt = bigger than
      return next_prime_gt - (data % next_prime_gt)



  def 						a_       ( self		,    __lowerCAmelCase		,    __lowerCAmelCase		,    __lowerCAmelCase   ):







      '''simple docstring'''


      return (increment * self.__hash_function_a(__lowerCAmelCase		,    __lowerCAmelCase   )) % self.size_table



  def 						a_       ( self		,    __lowerCAmelCase		,    __lowerCAmelCase=None   ):







      '''simple docstring'''


      _a							:       Any       					=			1
      _a							:       Dict       					=			self.hash_function(__lowerCAmelCase   )

      while self.values[new_key] is not None and self.values[new_key] != key:
          _a							:       Union[str, Any]       					=			(
              self.__hash_double_function(__lowerCAmelCase		,    __lowerCAmelCase		,    __lowerCAmelCase   )
              if self.balanced_factor() >= self.lim_charge
              else None
          )
          if new_key is None:
              break
          else:
              i += 1

      return new_key








'''simple docstring'''





from math import exp





def UpperCAmelCase						(					UpperCAmelCase_	):
    return 8 * x - 2 * exp(-x	)





def UpperCAmelCase						(					UpperCAmelCase_      ,  UpperCAmelCase_      ,  UpperCAmelCase_	):
    _a							:       Optional[int]       					=			lower_bound
    _a							:       str       					=			upper_bound
    for _ in range(0      ,  UpperCAmelCase_	):
        _a					,   _a							:       List[str]       					=			xa, xa - (f(UpperCAmelCase_	) * (xa - xa)) / (f(UpperCAmelCase_	) - f(UpperCAmelCase_	))
    return xa


if __name__ == "__main__":
  print(F"""Example: {secant_method(1, 3, 2)}""")


