


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

lowerCAmelCase           =		6_3_7_8_1_3_7.0
lowerCAmelCase           =		6_3_5_6_7_5_2.3_1_4_2_4_5
lowerCAmelCase           =		6_3_7_8_1_3_7







def        _lowerCamelCase(	lowercase__   , lowercase__   , lowercase__   , lowercase__	)						->	float:

		'''simple docstring'''







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


if __name__ == "__main__":
	import doctest

	doctest.testmod()










from collections.abc import Sequence







def        _lowerCamelCase(	lowercase__   , lowercase__ = False	)						->	float:

		'''simple docstring'''







		if not arr:
				return 0

		__lowercase=			0 if allow_empty_subarrays else float('-inf'	)
		__lowercase=			0.0
		for num in arr:
				__lowercase=			max(0 if allow_empty_subarrays else num   , curr_sum + num	)
				__lowercase=			max(lowercase__   , lowercase__	)

		return max_sum


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

	testmod()

	lowerCAmelCase           =		[-2, 1, -3, 4, -1, 2, 1, -5, 4]
	print(F'{max_subarray_sum(nums) = }')






