
'''simple docstring'''



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

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





def        _A						(							lowercase__						,						lowercase__						,						lowercase__						,						lowercase__		):
						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()











"""simple docstring"""
from collections.abc import Callable

import numpy as np

def       _snake_case						(						UpperCamelCase						:		Callable			,		UpperCamelCase						:		float			,		UpperCamelCase						:		float			,		UpperCamelCase						:		float			,		UpperCamelCase						:		float						):
 UpperCAmelCase	:					Any	=	int(np.ceil((x_end - xa) / step_size						)						)
 UpperCAmelCase	:					Optional[Any]	=	np.zeros((n + 1,)						)
 UpperCAmelCase	:					Optional[int]	=	ya
 UpperCAmelCase	:					int	=	xa

 for k in range(UpperCamelCase						):
  UpperCAmelCase	:					Optional[int]	=	y[k] + step_size * ode_func(UpperCamelCase			,		y[k]						)
  UpperCAmelCase	:					Optional[int]	=	y[k] + (
      (step_size / 2) * (ode_func(UpperCamelCase			,		y[k]						) + ode_func(x + step_size			,		UpperCamelCase						))
  )
  x += step_size

 return y


if __name__ == "__main__":
      import doctest

      doctest.testmod()
