
"""simple docstring"""


def      lowerCAmelCase_     (	snake_case_	:    int							,					snake_case_	:    int = 1_0_0_0    )     ->str:
			if (not isinstance(snake_case_							,					snake_case_    )) or (digit_position <= 0):
						raise ValueError('Digit position must be a positive integer'    )
			elif (not isinstance(snake_case_							,					snake_case_    )) or (precision < 0):
						raise ValueError('Precision must be a nonnegative integer'    )

			# compute an approximation of (16 ** (n - 1)) * pi whose fractional part is mostly
			# accurate
			lowerCamelCase__			:  Any  =(
			    4 * _subsum(snake_case_							,					1							,					snake_case_    )
			    - 2 * _subsum(snake_case_							,					4							,					snake_case_    )
			    - _subsum(snake_case_							,					5							,					snake_case_    )
			    - _subsum(snake_case_							,					6							,					snake_case_    )
			)

			# return the first hex digit of the fractional part of the result
			return hex(int((sum_result % 1) * 1_6    )    )[2:]






def      lowerCAmelCase_     (	snake_case_	:    int							,					snake_case_	:    int							,					snake_case_	:    int    )     ->float:
			lowerCamelCase__			:  Union[str, Any]  =0.0
			for sum_index in range(digit_pos_to_extract + precision    ):
						lowerCamelCase__			:  Dict  =8 * sum_index + denominator_addend
						if sum_index < digit_pos_to_extract:
									# if the exponential term is an integer and we mod it by the denominator
									# before dividing, only the integer part of the sum will change;
									# the fractional part will not
									lowerCamelCase__			:  int  =pow(
									    1_6							,					digit_pos_to_extract - 1 - sum_index							,					snake_case_    )
						else:
									lowerCamelCase__			:  Tuple  =pow(1_6							,					digit_pos_to_extract - 1 - sum_index    )
						total += exponential_term / denominator
			return total


if __name__ == "__main__":
							import doctest

							doctest.testmod()

"""simple docstring"""


import unittest
import warnings

from datasets.utils import experimental






@experimental
def      lowerCAmelCase_     (	)     ->Optional[Any]:
			return "success"

class 					A_			(  unittest.TestCase     ):



							"""simple docstring"""






							def    UpperCAmelCase__							(						self						:int ):





										"""simple docstring"""

										with warnings.catch_warnings(record=lowerCamelCase_ ) as w:
													warnings.simplefilter('always' )
													self.assertEqual(dummy_function()  ,							'success' )
										self.assertEqual(len(lowerCamelCase_ )  ,							1 )