


"""simple docstring"""



from decimal import Decimal, getcontext
from math import ceil, factorial






def    lowerCamelCase       (a_    :List[Any])  ->				str:

       if not isinstance(__snake_case					,					__snake_case):
              raise TypeError('''Undefined for non-integers''')
       elif precision < 1:
              raise ValueError('''Undefined for non-natural numbers''')

       lowercase		:List[str]											=					precision
       lowercase		:Union[str, Any]											=					ceil(precision / 14)
       lowercase		:int											=					42_6880 * Decimal(1_0005).sqrt()
       lowercase		:int											=					1
       lowercase		:List[str]											=					1359_1409
       lowercase		:Union[str, Any]											=					Decimal(__snake_case)
       for k in range(1					,					__snake_case):
              lowercase		:List[Any]											=					factorial(6 * k) // (factorial(3 * k) * factorial(__snake_case) ** 3)
              linear_term += 5_4514_0134
              exponential_term *= -26_2537_4126_4076_8000
              partial_sum += Decimal(multinomial_term * linear_term) / exponential_term
       return str(constant_term / partial_sum)[:-1]


if __name__ == "__main__":
 UpperCAmelCase   		=      50
 print(F"""The first {n} digits of pi is: {pi(n)}""")









# 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.
lowerCamelCase      :       Dict    =						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    __lowerCAmelCase   (    __snake_case							):
     from diffusers.utils.testing_utils import pytest_addoption_shared

     pytest_addoption_shared(__snake_case							)





def    __lowerCAmelCase   (    __snake_case							):
     from diffusers.utils.testing_utils import pytest_terminal_summary_main

     __lowerCAmelCase             =       terminalreporter.config.getoption("--make-reports"							)
     if make_reports:
          pytest_terminal_summary_main(__snake_case       ,			id=__snake_case							)






