
"""simple docstring"""





from math import asin, atan, cos, radians, sin, sqrt, tan

_a														=		637_8137.0
_a														=		635_6752.31_4245
_a														=		637_8137



def       lowerCamelCase__		(			__snake_case,     __snake_case,     __snake_case,     __snake_case	)							->		float:


					"""simple docstring"""





					_UpperCamelCase							 =  (AXIS_A - AXIS_B) / AXIS_A
					_UpperCamelCase							 =  atan((1 - flattening) * tan(radians(__snake_case	)	)	)
					_UpperCamelCase							 =  atan((1 - flattening) * tan(radians(__snake_case	)	)	)
					_UpperCamelCase							 =  radians(__snake_case	)
					_UpperCamelCase							 =  radians(__snake_case	)
					# Equation
					_UpperCamelCase							 =  sin((phi_a - phi_a) / 2	)
					_UpperCamelCase							 =  sin((lambda_a - lambda_a) / 2	)
					# Square both values
					sin_sq_phi *= sin_sq_phi
					sin_sq_lambda *= sin_sq_lambda
					_UpperCamelCase							 =  sqrt(sin_sq_phi + (cos(__snake_case	) * cos(__snake_case	) * sin_sq_lambda)	)
					return 2 * RADIUS * asin(__snake_case	)


if __name__ == "__main__":
				import doctest

				doctest.testmod()








"""simple docstring"""





from __future__ import annotations



def       lowerCamelCase__		(			__snake_case,     __snake_case,     __snake_case	)							->		int | float:


					"""simple docstring"""





					if len(__snake_case	) == 0:
										raise ValueError('''find_max() arg is an empty sequence'''	)
					if (
					    left >= len(__snake_case	)
					    or left < -len(__snake_case	)
					    or right >= len(__snake_case	)
					    or right < -len(__snake_case	)
					):
										raise IndexError('''list index out of range'''	)
					if left == right:
										return nums[left]
					_UpperCamelCase							 =  (left + right) >> 1  # the middle
					_UpperCamelCase							 =  find_max(__snake_case,     __snake_case,     __snake_case	)  # find max in range[left, mid]
					_UpperCamelCase							 =  find_max(__snake_case,     mid + 1,     __snake_case	)  # 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)






