

import math
from collections.abc import Callable







def a_		(							UpperCamelCase_ :				Callable[[float], float] ,       UpperCamelCase_ :				float ,       UpperCamelCase_ :				float	)				-> int:







 """simple docstring"""

 lowerCamelCase       =     xa
 lowerCamelCase       =     xa
 while True:
  if x_n == x_na or function(A__	) == function(A__	):
   raise ZeroDivisionError('float division by zero, could not find root'	)
  lowerCamelCase       =     x_na - (
      function(A__	) / ((function(A__	) - function(A__	)) / (x_na - x_n))
  )
  if abs(x_na - x_na	) < 1_0**-5:
   return x_na
  lowerCamelCase       =     x_na
  lowerCamelCase       =     x_na







def a_		(							UpperCamelCase_ :				float	)				-> Tuple:







 """simple docstring"""

 return math.pow(A__ ,       3	) - (2 * x) - 5


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







from typing import Any

import numpy as np





def 	__a     (      A__			:  np.ndarray       ):
    return np.array_equal(A__			,  matrix.conjugate().T       )





def 	__a     (      A__			:  np.ndarray			,  A__			:  np.ndarray       ):
    SCREAMING_SNAKE_CASE										=   v.conjugate().T
    SCREAMING_SNAKE_CASE										=   v_star.dot(A__       )
    assert isinstance(A__			,  np.ndarray       )
    return (v_star_dot.dot(A__       )) / (v_star.dot(A__       ))





def 	__a     (      ):
    SCREAMING_SNAKE_CASE										=   np.array([[2, 2 + 1j, 4], [2 - 1j, 3, 1j], [4, -1j, 1]]       )
    SCREAMING_SNAKE_CASE										=   np.array([[1], [2], [3]]       )
    assert is_hermitian(A__       ), F"{a} is not hermitian."
    print(rayleigh_quotient(A__			,  A__       )       )

    SCREAMING_SNAKE_CASE										=   np.array([[1, 2, 4], [2, 3, -1], [4, -1, 1]]       )
    assert is_hermitian(A__       ), F"{a} is not hermitian."
    assert rayleigh_quotient(A__			,  A__       ) == float(3       )


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    tests()