




from typing import Any

import numpy as np


def    A						(__A   :    Any       )   ->      bool:







     """simple docstring"""


     return np.array_equal(__snake_case   ,				matrix.conjugate().T       )


def    A						(__A   :    Tuple   ,				__A   :    Optional[Any]       )   ->      Any:







     """simple docstring"""


     UpperCAmelCase_          =							v.conjugate().T
     UpperCAmelCase_          =							v_star.dot(__snake_case       )
     assert isinstance(__snake_case   ,				np.ndarray       )
     return (v_star_dot.dot(__snake_case       )) / (v_star.dot(__snake_case       ))


def    A						()   ->      None:







     """simple docstring"""


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

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


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    tests()










from math import isqrt
def 				UpperCAmelCase_					(							__snake_case						)     ->			list[int]:







 """simple docstring"""


 _lowercase							      =[True] * max_number
 for i in range(2     ,						isqrt(max_number - 1						) + 1						):
  if is_prime[i]:
   for j in range(i**2     ,						__snake_case     ,						__snake_case						):
    _lowercase							      =False

 return [i for i in range(2     ,						__snake_case						) if is_prime[i]]
def 				UpperCAmelCase_					(							__snake_case = 10**8						)     ->			int:







 """simple docstring"""


 _lowercase							      =calculate_prime_numbers(max_number // 2						)

 _lowercase							      =0
 _lowercase							      =0
 _lowercase							      =len(__snake_case						) - 1
 while left <= right:
  while prime_numbers[left] * prime_numbers[right] >= max_number:
   right -= 1
  semiprimes_count += right - left + 1
  left += 1

 return semiprimes_count


if __name__ == "__main__":
  print(f'''{solution() = }''')

