





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

from .haversine_distance import haversine_distance

UpperCamelCase_												=	6_3_7_8_1_3_7.0
UpperCamelCase_												=	6_3_5_6_7_5_2.3_1_4_2_4_5
UpperCamelCase_												=	6_37_81_37






def 				_UpperCAmelCase			(    A				,							A				,							A				,							A     ):




   '''simple docstring'''

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

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

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

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

   # Intermediate Y value
   # Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
   UpperCAmelCase__						=(cos(A     ) ** 2) * (sin(A     ) ** 2)
   UpperCAmelCase__						=sin(sigma / 2     ) ** 2
   UpperCAmelCase__						=(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 				_UpperCAmelCase			(    A     ):




   '''simple docstring'''

   for i in range(len(A     ) - 1				,							0				,							-1     ):
      UpperCAmelCase__						=False

      for j in range(A				,							0				,							-1     ):
         if unsorted[j] < unsorted[j - 1]:
            UpperCAmelCase__			,							UpperCAmelCase__						=unsorted[j - 1], unsorted[j]
            UpperCAmelCase__						=True

      for j in range(A     ):
         if unsorted[j] > unsorted[j + 1]:
            UpperCAmelCase__			,							UpperCAmelCase__						=unsorted[j + 1], unsorted[j]
            UpperCAmelCase__						=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) = }""")



