



def 		UpperCAmelCase      (  _lowerCamelCase       ,			_lowerCamelCase = 1000			):
			if (not isinstance(_a       ,			_a			)) or (digit_position <= 0):
						raise ValueError("Digit position must be a positive integer"			)
			elif (not isinstance(_a       ,			_a			)) 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
			A							:    List[Any]								=  (
			    4 * _subsum(_a       ,			1       ,			_a			)
			    - 2 * _subsum(_a       ,			4       ,			_a			)
			    - _subsum(_a       ,			5       ,			_a			)
			    - _subsum(_a       ,			6       ,			_a			)
			)

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




def 		UpperCAmelCase      (  _lowerCamelCase       ,			_lowerCamelCase       ,			_lowerCamelCase			):
			A							:    List[str]								=  0.0
			for sum_index in range(digit_pos_to_extract + precision			):
						A							:    Optional[Any]								=  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
									A							:    Any								=  pow(
									    16       ,			digit_pos_to_extract - 1 - sum_index       ,			_a			)
						else:
									A							:    Optional[Any]								=  pow(16       ,			digit_pos_to_extract - 1 - sum_index			)
						total += exponential_term / denominator
			return total


if __name__ == "__main__":
							import doctest

							doctest.testmod()







def    lowerCAmelCase__		(			_a				:	int			):
		if not isinstance(_a     ,					_a			):
				snake_case_ :							Optional[int]         =				F'''Input value of [number={number}] must be an integer'''
				raise TypeError(_a			)
		if number < 1:
				raise ValueError("Input must be a positive integer"			)
		return number * (2 * number - 1)


if __name__ == "__main__":
							import doctest

							doctest.testmod()
