


'''simple docstring'''
from math import factorial, pi


def       a				(      __a			, __a = 30       )  ->     float:



					'''simple docstring'''






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

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

					UpperCamelCase__       :Optional[Any]							 =			float(__a       )
					UpperCamelCase__       :List[str]							 =			theta // (2 * pi)
					theta -= 2 * div * pi
					return sum(
					    (-1) ** r * theta ** (2 * r + 1) / factorial(2 * r + 1       ) for r in range(__a       )       )


def       a				(      __a			, __a = 30       )  ->     float:



					'''simple docstring'''






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

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

					UpperCamelCase__       :Union[str, Any]							 =			float(__a       )
					UpperCamelCase__       :int							 =			theta // (2 * pi)
					theta -= 2 * div * pi
					return sum((-1) ** r * theta ** (2 * r) / factorial(2 * r       ) for r in range(__a       )       )


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))



'''simple docstring'''
# tests directory-specific settings - this file is run automatically
# by pytest before any tests are run

import sys
import warnings
from os.path import abspath, dirname, join


# allow having multiple repository checkouts and not needing to remember to rerun
# 'pip install -e .[dev]' when switching between checkouts and running tests.
__snake_case											=					abspath(join(dirname(dirname(__file__)), '''src'''))
sys.path.insert(1, git_repo_path)

# silence FutureWarning warnings in tests since often we can't act on them until
# they become normal warnings - i.e. the tests still need to test the current functionality
warnings.simplefilter(action='''ignore''', category=FutureWarning)


def       a				(      __a       )  ->     Optional[int]:



					'''simple docstring'''






					from diffusers.utils.testing_utils import pytest_addoption_shared

					pytest_addoption_shared(__a       )







def       a				(      __a       )  ->     str:



					'''simple docstring'''






					from diffusers.utils.testing_utils import pytest_terminal_summary_main

					UpperCamelCase__       :Union[str, Any]							 =			terminalreporter.config.getoption('''--make-reports'''       )
					if make_reports:
										pytest_terminal_summary_main(__a			, id=__a       )