






'''simple docstring'''

from collections.abc import Callable






def 	_UpperCAmelCase    (  a		:	Callable[[float], float]						,			a		:	float						,			a		:	float							)			->			float:





						"""simple docstring"""
						lowercase_      :   float        =			a
						lowercase_      :   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:
												lowercase_      :   float        =			start + (end - start) / 2.0
												while abs(start - mid							) > 1_0**-7:  # until precisely equals to 10^-7
																		if function(a							) == 0:
																								return mid
																		elif function(a							) * function(a							) < 0:
																								lowercase_      :   Dict        =			mid
																		else:
																								lowercase_      :   Optional[Any]        =			mid
																		lowercase_      :   Any        =			start + (end - start) / 2.0
												return mid






def 	_UpperCAmelCase    (  a		:	float							)			->			float:





						"""simple docstring"""
						return x**3 - 2 * x - 5


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

		import doctest

		doctest.testmod()








'''simple docstring'''

def 	_UpperCAmelCase    (  a		:	int						,			a		:	int							)			->			int:





						"""simple docstring"""
						while second != 0:
												lowercase_      :   Any        =			first & second
												first ^= second
												lowercase_      :   List[str]        =			c << 1
						return first


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						A:      Union[str, Any]  				=				int(input("Enter the first number: ").strip())
						A:      Union[str, Any]  				=				int(input("Enter the second number: ").strip())
						print(f"""{add(first, second) = }""")
