





from ..utils import DummyObject, requires_backends
class SCREAMING_SNAKE_CASE_  (    metaclass=snake_case_    ):
						__magic_name__:	Optional[int]       					=				['torch', 'torchsde']






						def __init__(					self					:					Any						,      *_A					:					str						,      **_A					:					Union[str, Any]		)							->			Any:







							"""simple docstring"""


							requires_backends(self						,      ['torch', 'torchsde']		)






						@classmethod
						def UpperCAmelCase_ (					cls					:					Optional[Any]						,      *_A					:					List[Any]						,      **_A					:					List[str]		)							->			str:







							"""simple docstring"""


							requires_backends(cls						,      ['torch', 'torchsde']		)






						@classmethod
						def UpperCAmelCase_ (					cls					:					Dict						,      *_A					:					Any						,      **_A					:					Optional[int]		)							->			Tuple:







							"""simple docstring"""


							requires_backends(cls						,      ['torch', 'torchsde']		)


"""simple docstring"""






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


def 			UpperCAmelCase__       (				lowerCAmelCase__     :int		) ->    str:
      '''simple docstring'''


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

      lowercase														=	precision
      lowercase														=	ceil(precision / 1_4		)
      lowercase														=	4_2_6_8_8_0 * Decimal(1_0_0_0_5		).sqrt()
      lowercase														=	1
      lowercase														=	1_3_5_9_1_4_0_9
      lowercase														=	Decimal(lowerCAmelCase__		)
      for k in range(1					,		lowerCAmelCase__		):
            lowercase														=	factorial(6 * k		) // (factorial(3 * k		) * factorial(lowerCAmelCase__		) ** 3)
            linear_term += 5_4_5_1_4_0_1_3_4
            exponential_term *= -2_6_2_5_3_7_4_1_2_6_4_0_7_6_8_0_0_0
            partial_sum += Decimal(multinomial_term * linear_term		) / exponential_term
      return str(constant_term / partial_sum		)[:-1]


if __name__ == "__main__":
       __lowerCAmelCase    :       List[Any]					     =5_0
       print(F"""The first {n} digits of pi is: {pi(n)}""")



