



'''simple docstring'''

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

SCREAMING_SNAKE_CASE__     :						Optional[int]	=  637_8137.0
SCREAMING_SNAKE_CASE__     :						Dict	=  635_6752.31_4245
SCREAMING_SNAKE_CASE__     :						Any	=  6_3_7_8_1_3_7






def 				a  (     UpperCamelCase_    :    float      ,					UpperCamelCase_    :    float      ,					UpperCamelCase_    :    float      ,					UpperCamelCase_    :    float			)       ->	float:
		snake_case__	     =(AXIS_A - AXIS_B) / AXIS_A
		snake_case__	     =atan((1 - flattening) * tan(radians(UpperCamelCase_			)			)			)
		snake_case__	     =atan((1 - flattening) * tan(radians(UpperCamelCase_			)			)			)
		snake_case__	     =radians(UpperCamelCase_			)
		snake_case__	     =radians(UpperCamelCase_			)
		# Equation
		snake_case__	     =sin((phi_a - phi_a) / 2			)
		snake_case__	     =sin((lambda_a - lambda_a) / 2			)
		# Square both values
		sin_sq_phi *= sin_sq_phi
		sin_sq_lambda *= sin_sq_lambda
		snake_case__	     =sqrt(sin_sq_phi + (cos(UpperCamelCase_			) * cos(UpperCamelCase_			) * sin_sq_lambda)			)
		return 2 * RADIUS * asin(UpperCamelCase_			)


if __name__ == "__main__":
			import doctest

			doctest.testmod()









'''simple docstring'''

import os

SCREAMING_SNAKE_CASE__     :						Optional[Any]	=  {'''I''': 1, '''V''': 5, '''X''': 1_0, '''L''': 5_0, '''C''': 1_0_0, '''D''': 5_0_0, '''M''': 1_0_0_0}






def 				a  (     UpperCamelCase_    :    str			)       ->	int:
		snake_case__	     =0

		snake_case__	     =0
		while index < len(UpperCamelCase_			) - 1:
				snake_case__	     =SYMBOLS[numerals[index]]
				snake_case__	     =SYMBOLS[numerals[index + 1]]
				if current_value < next_value:
						total_value -= current_value
				else:
						total_value += current_value
				index += 1
		total_value += SYMBOLS[numerals[index]]

		return total_value






def 				a  (     UpperCamelCase_    :    int			)       ->	str:
		snake_case__	     =''

		snake_case__	     =num // 1000
		numerals += m_count * "M"
		num %= 1000

		snake_case__	     =num // 100
		if c_count == 9:
				numerals += "CM"
				c_count -= 9
		elif c_count == 4:
				numerals += "CD"
				c_count -= 4
		if c_count >= 5:
				numerals += "D"
				c_count -= 5
		numerals += c_count * "C"
		num %= 100

		snake_case__	     =num // 10
		if x_count == 9:
				numerals += "XC"
				x_count -= 9
		elif x_count == 4:
				numerals += "XL"
				x_count -= 4
		if x_count >= 5:
				numerals += "L"
				x_count -= 5
		numerals += x_count * "X"
		num %= 10

		if num == 9:
				numerals += "IX"
				num -= 9
		elif num == 4:
				numerals += "IV"
				num -= 4
		if num >= 5:
				numerals += "V"
				num -= 5
		numerals += num * "I"

		return numerals






def 				a  (     UpperCamelCase_    :    str = "/p089_roman.txt"			)       ->	int:
		snake_case__	     =0

		with open(os.path.dirname(UpperCamelCase_			) + roman_numerals_filename			) as filea:
				snake_case__	     =filea.readlines()

		for line in lines:
				snake_case__	     =line.strip()
				snake_case__	     =parse_roman_numerals(UpperCamelCase_			)
				snake_case__	     =generate_roman_numerals(UpperCamelCase_			)
				savings += len(UpperCamelCase_			) - len(UpperCamelCase_			)

		return savings


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




