





"""simple docstring"""






from collections.abc import Callable

def       __A (     a_  :Callable[[float], float]				,    a_  :float				,    a_  :float)						->						float:
    __a	:  float         =					a
    __a	:  float         =					b
    if function(a_) == 0:  # one of the a or b is a root for the function
        return a
    elif function(a_) == 0:
        return b
    elif (
        function(a_) * function(a_) > 0
    ):  # if none of these are root and they are both positive or negative,
        # then this algorithm can't find the root
        raise ValueError('''could not find root in given interval.''')
    else:
        __a	:  float         =					start + (end - start) / 2.0
        while abs(start - mid) > 10**-7:  # until precisely equals to 10^-7
            if function(a_) == 0:
                return mid
            elif function(a_) * function(a_) < 0:
                __a	:  Union[str, Any]         =					mid
            else:
                __a	:  List[str]         =					mid
            __a	:  str         =					start + (end - start) / 2.0
        return mid

def       __A (     a_  :float)						->						float:
    return x**3 - 2 * x - 5


if __name__ == "__main__":
  print(bisection(f, 1, 1_000))

  import doctest

  doctest.testmod()






"""simple docstring"""






def       __A (     a_  :int = 1_00_00_00)						->						int:
				__a	:  Tuple         =					[i - 1 for i in range(limit + 1)]

				for i in range(2				,    limit + 1):
								if phi[i] == i - 1:
												for j in range(2 * i				,    limit + 1				,    a_):
																phi[j] -= phi[j] // i

				return sum(phi[2 : limit + 1])


if __name__ == "__main__":
		print(solution())