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

from .haversine_distance import haversine_distance

__lowerCAmelCase			:     str           =   637_8137.0
__lowerCAmelCase			:     Optional[Any]           =   635_6752.31_4245
__lowerCAmelCase			:     List[str]           =   6378137

def a__    (       A_,     A_,     A_,     A_					):






  '''simple docstring'''





  __magic_name__				     =       (AXIS_A - AXIS_B) / AXIS_A
  # Parametric latitudes
  # https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
  __magic_name__				     =       atan((1 - flattening) * tan(radians(A_					)					)					)
  __magic_name__				     =       atan((1 - flattening) * tan(radians(A_					)					)					)

  # Compute central angle between two points
  # using haversine theta. sigma =  haversine_distance / equatorial radius
  __magic_name__				     =       haversine_distance(A_,     A_,     A_,     A_					) / EQUATORIAL_RADIUS

  # Intermediate P and Q values
  __magic_name__				     =       (b_lata + b_lata) / 2
  __magic_name__				     =       (b_lata - b_lata) / 2

  # Intermediate X value
  # X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
  __magic_name__				     =       (sin(A_					) ** 2) * (cos(A_					) ** 2)
  __magic_name__				     =       cos(sigma / 2					) ** 2
  __magic_name__				     =       (sigma - sin(A_					)) * (x_numerator / x_demonimator)

  # Intermediate Y value
  # Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
  __magic_name__				     =       (cos(A_					) ** 2) * (sin(A_					) ** 2)
  __magic_name__				     =       sin(sigma / 2					) ** 2
  __magic_name__				     =       (sigma + sin(A_					)) * (y_numerator / y_denominator)

  return EQUATORIAL_RADIUS * (sigma - ((flattening / 2) * (x_value + y_value)))


if __name__ == "__main__":
    import doctest

    doctest.testmod()









def      lowercase__      (     __snake_case    :							list  ):


					'''simple docstring'''


					for i in range(len(__snake_case  ) - 1     ,       0     ,       -1  ):
										UpperCAmelCase_    :      Dict            =						False

										for j in range(__snake_case     ,       0     ,       -1  ):
															if unsorted[j] < unsorted[j - 1]:
																				UpperCAmelCase_       ,  UpperCAmelCase_    :      Any            =						unsorted[j - 1], unsorted[j]
																				UpperCAmelCase_    :      int            =						True

										for j in range(__snake_case  ):
															if unsorted[j] > unsorted[j + 1]:
																				UpperCAmelCase_       ,  UpperCAmelCase_    :      Optional[int]            =						unsorted[j + 1], unsorted[j]
																				UpperCAmelCase_    :      Any            =						True

										if not swapped:
															break
					return unsorted


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		__UpperCAmelCase								=						input('Enter numbers separated by a comma:\n').strip()
		__UpperCAmelCase								=						[int(item) for item in user_input.split(',')]
		print(F'{cocktail_shaker_sort(unsorted) = }')






