

'''simple docstring'''
def 			_lowerCAmelCase   (		_UpperCamelCase		:	Optional[Any]							) ->     list:
     """simple docstring"""




     def merge(_UpperCamelCase		:	Dict				,					_UpperCamelCase		:	List[str]							) -> list:

          def _merge():
               while left and right:
                    yield (left if left[0] <= right[0] else right).pop(0							)
               yield from left
               yield from right

          return list(_merge()							)

     if len(_SCREAMING_SNAKE_CASE							) <= 1:
          return collection
     _SCREAMING_SNAKE_CASE				       =len(_SCREAMING_SNAKE_CASE							) // 2
     return merge(merge_sort(collection[:mid]							)				,					merge_sort(collection[mid:]							)							)


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     lowerCamelCase					: Tuple   					=	input("Enter numbers separated by a comma:\n").strip()
     lowerCamelCase					: Tuple   					=	[int(item) for item in user_input.split(",")]
     print(*merge_sort(unsorted), sep=",")







from collections.abc import Callable





def 				__lowerCAmelCase(       _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE							,     _SCREAMING_SNAKE_CASE				)							-> float:




    """simple docstring"""




    _A     =							a
    _A     =							b
    if function(_SCREAMING_SNAKE_CASE				) == 0:  # one of the a or b is a root for the function
        return a
    elif function(_SCREAMING_SNAKE_CASE				) == 0:
        return b
    elif (
        function(_SCREAMING_SNAKE_CASE				) * function(_SCREAMING_SNAKE_CASE				) > 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     =							start + (end - start) / 2.0
        while abs(start - mid				) > 10**-7:  # until precisely equals to 10^-7
            if function(_SCREAMING_SNAKE_CASE				) == 0:
                return mid
            elif function(_SCREAMING_SNAKE_CASE				) * function(_SCREAMING_SNAKE_CASE				) < 0:
                _A     =							mid
            else:
                _A     =							mid
            _A     =							start + (end - start) / 2.0
        return mid





def 				__lowerCAmelCase(       _SCREAMING_SNAKE_CASE				)							-> float:




    """simple docstring"""




    return x**3 - 2 * x - 5


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

 import doctest

 doctest.testmod()





