from math import factorial, pi




def       _snake_case	(   lowerCAmelCase							:   float   , lowerCAmelCase							:   int = 3_0	):
		"""simple docstring"""







		if not isinstance(lowerCAmelCase   , (int, float)	):
				raise ValueError("maclaurin_sin() requires either an int or float for theta"	)

		if not isinstance(lowerCAmelCase   , lowerCAmelCase	) or accuracy <= 0:
				raise ValueError("maclaurin_sin() requires a positive int for accuracy"	)

		SCREAMING_SNAKE_CASE_  :		int				      =    float(lowerCAmelCase	)
		SCREAMING_SNAKE_CASE_  :		List[Any]				      =    theta // (2 * pi)
		theta -= 2 * div * pi
		return sum(
		    (-1) ** r * theta ** (2 * r + 1) / factorial(2 * r + 1	) for r in range(lowerCAmelCase	)	)




def       _snake_case	(   lowerCAmelCase							:   float   , lowerCAmelCase							:   int = 3_0	):
		"""simple docstring"""







		if not isinstance(lowerCAmelCase   , (int, float)	):
				raise ValueError("maclaurin_cos() requires either an int or float for theta"	)

		if not isinstance(lowerCAmelCase   , lowerCAmelCase	) or accuracy <= 0:
				raise ValueError("maclaurin_cos() requires a positive int for accuracy"	)

		SCREAMING_SNAKE_CASE_  :		str				      =    float(lowerCAmelCase	)
		SCREAMING_SNAKE_CASE_  :		Optional[int]				      =    theta // (2 * pi)
		theta -= 2 * div * pi
		return sum((-1) ** r * theta ** (2 * r) / factorial(2 * r	) for r in range(lowerCAmelCase	)	)


if __name__ == "__main__":
		import doctest

		doctest.testmod()

		print(maclaurin_sin(10))
		print(maclaurin_sin(-10))
		print(maclaurin_sin(10, 15))
		print(maclaurin_sin(-10, 15))

		print(maclaurin_cos(5))
		print(maclaurin_cos(-5))
		print(maclaurin_cos(10, 15))
		print(maclaurin_cos(-10, 15))







def  _SCREAMING_SNAKE_CASE				(   a  )      ->      str:
					if number > 0:
										raise ValueError('input must be a negative integer'  )
					__A	:						Optional[int]       =				len(bin(a  )[3:]  )
					__A	:						Dict       =				bin(abs(a  ) - (1 << binary_number_length)  )[3:]
					__A	:						int       =				(
					    (
					        '1'
					        + '0' * (binary_number_length - len(a  ))
					        + twos_complement_number
					    )
					    if number < 0
					    else '0'
					)
					return "0b" + twos_complement_number


if __name__ == "__main__":
				import doctest

				doctest.testmod()




