

"""simple docstring"""






from collections.abc import Callable



def   lowercase_	(    _lowercase       :		Callable[[float], float]							,      _lowercase       :		float							,      _lowercase       :		float	):




					'''simple docstring'''






					UpperCAmelCase			:   float      =				a
					UpperCAmelCase			:   float      =				b
					if function(_lowercase	) == 0:  # one of the a or b is a root for the function
										return a
					elif function(_lowercase	) == 0:
										return b
					elif (
					    function(_lowercase	) * function(_lowercase	) > 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:
										UpperCAmelCase			:   float      =				start + (end - start) / 2.0
										while abs(start - mid	) > 10**-7:  # until precisely equals to 10^-7
															if function(_lowercase	) == 0:
																				return mid
															elif function(_lowercase	) * function(_lowercase	) < 0:
																				UpperCAmelCase			:   Dict      =				mid
															else:
																				UpperCAmelCase			:   str      =				mid
															UpperCAmelCase			:   List[Any]      =				start + (end - start) / 2.0
										return mid



def   lowercase_	(    _lowercase       :		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"""






snake_case_   :   str        =       [
    """DownloadConfig""",
    """DownloadManager""",
    """DownloadMode""",
    """StreamingDownloadManager""",
]

from .download_config import DownloadConfig
from .download_manager import DownloadManager, DownloadMode
from .streaming_download_manager import StreamingDownloadManager


