





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

from .haversine_distance import haversine_distance

lowercase_					     =	6_378_137.0
lowercase_					     =	6_356_752.314_245
lowercase_					     =	6_378_137




def     __UpperCamelCase						(_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE	,		_SCREAMING_SNAKE_CASE	)       ->     float:
  lowercase__			    =						(AXIS_A - AXIS_B) / AXIS_A
  # Parametric latitudes
  # https://en.wikipedia.org/wiki/Latitude#Parametric_(or_reduced)_latitude
  lowercase__			    =						atan((1 - flattening) * tan(radians(_SCREAMING_SNAKE_CASE	)	)	)
  lowercase__			    =						atan((1 - flattening) * tan(radians(_SCREAMING_SNAKE_CASE	)	)	)

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

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

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

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

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


if __name__ == "__main__":
      import doctest

      doctest.testmod()









def     __UpperCamelCase						(_SCREAMING_SNAKE_CASE = 50	)       ->     int:
  lowercase__			    =						[1] * (length + 1)

  for row_length in range(3	,		length + 1	):
    for block_length in range(3	,		row_length + 1	):
      for block_start in range(row_length - block_length	):
        ways_number[row_length] += ways_number[
            row_length - block_start - block_length - 1
        ]

      ways_number[row_length] += 1

  return ways_number[length]


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


