



"""simple docstring"""






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

lowerCAmelCase__        =				6_3_7_8_1_3_7.0
lowerCAmelCase__        =				6_3_5_6_7_5_2.3_1_4_2_4_5
lowerCAmelCase__        =				6378137






def        snake_case_  (      A_					:		float,				A_					:		float,				A_					:		float,				A_					:		float						):


       '''simple docstring'''





       _lowerCamelCase						:				Union[str, Any]    			= (AXIS_A - AXIS_B) / AXIS_A
       _lowerCamelCase						:				List[Any]    			= atan((1 - flattening) * tan(radians(A_						)						)						)
       _lowerCamelCase						:				List[str]    			= atan((1 - flattening) * tan(radians(A_						)						)						)
       _lowerCamelCase						:				List[str]    			= radians(A_						)
       _lowerCamelCase						:				Tuple    			= radians(A_						)
       # Equation
       _lowerCamelCase						:				str    			= sin((phi_a - phi_a) / 2						)
       _lowerCamelCase						:				Optional[Any]    			= sin((lambda_a - lambda_a) / 2						)
       # Square both values
       sin_sq_phi *= sin_sq_phi
       sin_sq_lambda *= sin_sq_lambda
       _lowerCamelCase						:				List[str]    			= sqrt(sin_sq_phi + (cos(A_						) * cos(A_						) * sin_sq_lambda)						)
       return 2 * RADIUS * asin(A_						)


if __name__ == "__main__":
   import doctest

   doctest.testmod()








from math import pi, sqrt





def 		__A		(	__lowerCamelCase    )      ->       float:
	if num <= 0:
		raise ValueError("""math domain error"""    )
	if num > 171.5:
		raise OverflowError("""math range error"""    )
	elif num - int(__lowerCamelCase    ) not in (0, 0.5):
		raise NotImplementedError("""num must be an integer or a half-integer"""    )
	elif num == 0.5:
		return sqrt(__lowerCamelCase    )
	else:
		return 1.0 if num == 1 else (num - 1) * gamma(num - 1    )





def 		__A		(	)      ->       None:
	assert gamma(0.5    ) == sqrt(__lowerCamelCase    )
	assert gamma(1    ) == 1.0
	assert gamma(2    ) == 1.0


if __name__ == "__main__":
		from doctest import testmod

		testmod()
		__UpperCamelCase					:       str    					=      1.0
		while num:
				__UpperCamelCase					:       Dict    					=      float(input("Gamma of: "))
				print(F'gamma({num}) = {gamma(num)}')
				print("\nEnter 0 to exit...")

