





from math import factorial, pi

def 				SCREAMING_SNAKE_CASE__							(	snake_case__	:float      ,				snake_case__	:int = 30  )   ->    float:

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

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

  _lowercase						    =			float(snake_case__  )
  _lowercase						    =			theta // (2 * pi)
  theta -= 2 * div * pi
  return sum(
      (-1) ** r * theta ** (2 * r + 1) / factorial(2 * r + 1  ) for r in range(snake_case__  )  )

def 				SCREAMING_SNAKE_CASE__							(	snake_case__	:float      ,				snake_case__	:int = 30  )   ->    float:

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

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

  _lowercase						    =			float(snake_case__  )
  _lowercase						    =			theta // (2 * pi)
  theta -= 2 * div * pi
  return sum((-1) ** r * theta ** (2 * r) / factorial(2 * r  ) for r in range(snake_case__  )  )


if __name__ == "__main__":
      import doctest

      doctest.testmod()

      print(maclaurin_sin(1_0))
      print(maclaurin_sin(-1_0))
      print(maclaurin_sin(1_0, 1_5))
      print(maclaurin_sin(-1_0, 1_5))

      print(maclaurin_cos(5))
      print(maclaurin_cos(-5))
      print(maclaurin_cos(1_0, 1_5))
      print(maclaurin_cos(-1_0, 1_5))






def   __lowerCamelCase   (				__a  :int       ,	__a  :int       )						->							Optional[Any]:






		"""simple docstring"""

		if b == 0:
				return 1
		if (b % 2) == 0:
				return actual_power(__a       ,	int(b / 2       )       ) * actual_power(__a       ,	int(b / 2       )       )
		else:
				return a * actual_power(__a       ,	int(b / 2       )       ) * actual_power(__a       ,	int(b / 2       )       )







def   __lowerCamelCase   (				__a  :int       ,	__a  :int       )						->							float:






		"""simple docstring"""

		if b < 0:
				return 1 / actual_power(__a       ,	__a       )
		return actual_power(__a       ,	__a       )


if __name__ == "__main__":
					print(power(-2, -3))



