

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

from .haversine_distance import haversine_distance

lowerCAmelCase     :   Union[str, Any]						     =  6_37_81_37.0
lowerCAmelCase     :   Tuple						     =  6_35_67_52.31_42_45
lowerCAmelCase     :   int						     =  6_37_81_37





def    A_  (							a					,   a					,   a					,   a  ):

      """simple docstring"""



      SCREAMING_SNAKE_CASE_				:  List[str]           =     (AXIS_A - AXIS_B) / AXIS_A
      # Parametric latitudes
      # https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
      SCREAMING_SNAKE_CASE_				:  Optional[int]           =     atan((1 - flattening) * tan(radians(a  )  )  )
      SCREAMING_SNAKE_CASE_				:  Tuple           =     atan((1 - flattening) * tan(radians(a  )  )  )

      # Compute central angle between two points
      # using haversine theta. sigma =  haversine_distance / equatorial radius
      SCREAMING_SNAKE_CASE_				:  Optional[Any]           =     haversine_distance(a					,   a					,   a					,   a  ) / EQUATORIAL_RADIUS

      # Intermediate P and Q values
      SCREAMING_SNAKE_CASE_				:  str           =     (b_lata + b_lata) / 2
      SCREAMING_SNAKE_CASE_				:  int           =     (b_lata - b_lata) / 2

      # Intermediate X value
      # X = (sigma - sin(sigma)) * sin^2Pcos^2Q / cos^2(sigma/2)
      SCREAMING_SNAKE_CASE_				:  Any           =     (sin(a  ) ** 2) * (cos(a  ) ** 2)
      SCREAMING_SNAKE_CASE_				:  Optional[Any]           =     cos(sigma / 2  ) ** 2
      SCREAMING_SNAKE_CASE_				:  List[Any]           =     (sigma - sin(a  )) * (x_numerator / x_demonimator)

      # Intermediate Y value
      # Y = (sigma + sin(sigma)) * cos^2Psin^2Q / sin^2(sigma/2)
      SCREAMING_SNAKE_CASE_				:  str           =     (cos(a  ) ** 2) * (sin(a  ) ** 2)
      SCREAMING_SNAKE_CASE_				:  Tuple           =     sin(sigma / 2  ) ** 2
      SCREAMING_SNAKE_CASE_				:  Any           =     (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    A_  (							a  ):

      """simple docstring"""



      SCREAMING_SNAKE_CASE_				:  List[Any]           =     0
      while num > 0:
            digit_sum += num % 1_0
            num //= 1_0
      return digit_sum

def    A_  (							a = 1_0_0  ):

      """simple docstring"""



      SCREAMING_SNAKE_CASE_				:  List[str]           =     1
      SCREAMING_SNAKE_CASE_				:  Union[str, Any]           =     2

      for i in range(2					,   max_n + 1  ):
            SCREAMING_SNAKE_CASE_				:  List[str]           =     pre_numerator
            SCREAMING_SNAKE_CASE_				:  str           =     2 * i // 3 if i % 3 == 0 else 1
            SCREAMING_SNAKE_CASE_				:  Tuple           =     cur_numerator
            SCREAMING_SNAKE_CASE_				:  Tuple           =     e_cont * pre_numerator + temp

      return sum_digits(a  )


if __name__ == "__main__":
    print(F'{solution() = }')






