


'''simple docstring'''

from __future__ import annotations





def lowerCamelCase      (      lowerCAmelCase    :     list[int | float]		,		lowerCAmelCase    :     int		,		lowerCAmelCase    :     int		):





	"""simple docstring"""







	if len(lowerCAmelCase		) == 0:
		raise ValueError('find_max() arg is an empty sequence'		)
	if (
	    left >= len(lowerCAmelCase		)
	    or left < -len(lowerCAmelCase		)
	    or right >= len(lowerCAmelCase		)
	    or right < -len(lowerCAmelCase		)
	):
		raise IndexError('list index out of range'		)
	if left == right:
		return nums[left]
	__magic_name__	:   List[Any]					     =					(left + right) >> 1  # the middle
	__magic_name__	:   int					     =					find_max(lowerCAmelCase		,		lowerCAmelCase		,		lowerCAmelCase		)  # find max in range[left, mid]
	__magic_name__	:   Optional[int]					     =					find_max(lowerCAmelCase		,		mid + 1		,		lowerCAmelCase		)  # find max in range[mid + 1, right]

	return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
				import doctest

				doctest.testmod(verbose=True)



'''simple docstring'''

import math





def lowerCamelCase      (      lowerCAmelCase    :     float		,		lowerCAmelCase    :     float		):





	"""simple docstring"""







	return math.pow(lowerCAmelCase		,		2		) - a





def lowerCamelCase      (      lowerCAmelCase    :     float		):





	"""simple docstring"""







	return 2 * x





def lowerCamelCase      (      lowerCAmelCase    :     float		):





	"""simple docstring"""







	__magic_name__	:   List[Any]					     =					2.0

	while start <= a:
		__magic_name__	:   List[str]					     =					math.pow(lowerCAmelCase		,		2		)

	return start





def lowerCamelCase      (      lowerCAmelCase    :     float		,		lowerCAmelCase    :     int = 9999		,		lowerCAmelCase    :     float = 0.00_0000_0000_0001		):





	"""simple docstring"""







	if a < 0:
		raise ValueError('math domain error'		)

	__magic_name__	:   Any					     =					get_initial_point(lowerCAmelCase		)

	for _ in range(lowerCAmelCase		):
		__magic_name__	:   List[str]					     =					value
		__magic_name__	:   Optional[int]					     =					value - fx(lowerCAmelCase		,		lowerCAmelCase		) / fx_derivative(lowerCAmelCase		)
		if abs(prev_value - value		) < tolerance:
			return value

	return value


if __name__ == "__main__":
							from doctest import testmod

							testmod()