
"""simple docstring"""





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

from .haversine_distance import haversine_distance

UpperCamelCase_       :    List[Any]						      =			637_8137.0
UpperCamelCase_       :    Union[str, Any]						      =			635_6752.31_4245
UpperCamelCase_       :    Any						      =			637_8137
def 				A_  (__a					, __a					, __a					, __a					):

					'''simple docstring'''





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

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

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

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

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

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


if __name__ == "__main__":
		import doctest

		doctest.testmod()











def 		_SCREAMING_SNAKE_CASE     ( lowerCAmelCase__							,lowerCAmelCase__						):
		if number < 0 or shift_amount < 0:
				raise ValueError('both inputs must be positive integers'						)

		lowerCamelCase_	:     int 						=      str(bin(lowerCAmelCase__						)						)
		binary_number += "0" * shift_amount
		return binary_number


def 		_SCREAMING_SNAKE_CASE     ( lowerCAmelCase__							,lowerCAmelCase__						):
		if number < 0 or shift_amount < 0:
				raise ValueError('both inputs must be positive integers'						)

		lowerCamelCase_	:     Union[str, Any] 						=      str(bin(lowerCAmelCase__						)						)[2:]
		if shift_amount >= len(lowerCAmelCase__						):
				return "0b0"
		lowerCamelCase_	:     List[str] 						=      binary_number[: len(lowerCAmelCase__						) - shift_amount]
		return "0b" + shifted_binary_number


def 		_SCREAMING_SNAKE_CASE     ( lowerCAmelCase__							,lowerCAmelCase__						):
		if number >= 0:  # Get binary representation of positive number
				lowerCamelCase_	:     List[Any] 						=      '0' + str(bin(lowerCAmelCase__						)						).strip('-'						)[2:]
		else:  # Get binary (2's complement) representation of negative number
				lowerCamelCase_	:     Any 						=      len(bin(lowerCAmelCase__						)[3:]						)  # Find 2's complement of number
				lowerCamelCase_	:     List[str] 						=      bin(abs(lowerCAmelCase__						) - (1 << binary_number_length)						)[3:]
				lowerCamelCase_	:     List[str] 						=      (
				    '1' + '0' * (binary_number_length - len(lowerCAmelCase__						)) + binary_number
				)

		if shift_amount >= len(lowerCAmelCase__						):
				return "0b" + binary_number[0] * len(lowerCAmelCase__						)
		return (
		    "0b"
		    + binary_number[0] * shift_amount
		    + binary_number[: len(lowerCAmelCase__						) - shift_amount]
		)


if __name__ == "__main__":
		import doctest

		doctest.testmod()
