

import math
from collections.abc import Callable





def 	__a     (      A__			:  Callable[[float], float]			,  A__			:  float			,  A__			:  float       ):
    SCREAMING_SNAKE_CASE										=   xa
    SCREAMING_SNAKE_CASE										=   xa
    while True:
        if x_n == x_na or function(A__       ) == function(A__       ):
            raise ZeroDivisionError("float division by zero, could not find root"       )
        SCREAMING_SNAKE_CASE										=   x_na - (
            function(A__       ) / ((function(A__       ) - function(A__       )) / (x_na - x_n))
        )
        if abs(x_na - x_na       ) < 10**-5:
            return x_na
        SCREAMING_SNAKE_CASE										=   x_na
        SCREAMING_SNAKE_CASE										=   x_na





def 	__a     (      A__			:  float       ):
    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()