






def __A					(   __lowerCAmelCase			)->						float:





						"""simple docstring"""



						return -num if num < 0 else num


def __A					(   __lowerCAmelCase			)->						int:





						"""simple docstring"""



						if len(__lowerCAmelCase			) == 0:
												raise ValueError('abs_min() arg is an empty sequence'			)
						_UpperCAmelCase             =    x[0]
						for i in x:
												if abs_val(__lowerCAmelCase			) < abs_val(__lowerCAmelCase			):
																		_UpperCAmelCase             =    i
						return j


def __A					(   __lowerCAmelCase			)->						int:





						"""simple docstring"""



						if len(__lowerCAmelCase			) == 0:
												raise ValueError('abs_max() arg is an empty sequence'			)
						_UpperCAmelCase             =    x[0]
						for i in x:
												if abs(__lowerCAmelCase			) > abs(__lowerCAmelCase			):
																		_UpperCAmelCase             =    i
						return j


def __A					(   __lowerCAmelCase			)->						int:





						"""simple docstring"""



						if len(__lowerCAmelCase			) == 0:
												raise ValueError('abs_max_sort() arg is an empty sequence'			)
						return sorted(__lowerCAmelCase				,	key=__lowerCAmelCase			)[-1]


def __A					(   )->						List[Any]:





						"""simple docstring"""



						assert abs_val(0			) == 0
						assert abs_val(34			) == 34
						assert abs_val(-100_000_000_000			) == 100_000_000_000

						_UpperCAmelCase             =    [-3, -1, 2, -11]
						assert abs_max(__lowerCAmelCase			) == -11
						assert abs_max_sort(__lowerCAmelCase			) == -11
						assert abs_min(__lowerCAmelCase			) == -1


if __name__ == "__main__":
		import doctest

		doctest.testmod()

		test_abs_val()
		print(abs_val(-34))  # --> 34













import math
from timeit import timeit


def __A					(   __lowerCAmelCase			)->						int:





						"""simple docstring"""



						_UpperCAmelCase             =    0
						_UpperCAmelCase             =    abs(__lowerCAmelCase			)
						while True:
												_UpperCAmelCase             =    n // 10
												digits += 1
												if n == 0:
																		break
						return digits


def __A					(   __lowerCAmelCase			)->						int:





						"""simple docstring"""



						return 1 if n == 0 else math.floor(math.log(abs(__lowerCAmelCase			)				,	10			) + 1			)


def __A					(   __lowerCAmelCase			)->						int:





						"""simple docstring"""



						return len(str(abs(__lowerCAmelCase			)			)			)


def __A					(   )->						None:





						"""simple docstring"""



						from collections.abc import Callable

						def benchmark_a_function(__lowerCAmelCase				,	__lowerCAmelCase			) -> None:
												_UpperCAmelCase             =    F"""{func.__name__}({value})"""
												_UpperCAmelCase             =    timeit(F"""__main__.{call}"""				,	setup='import __main__'			)
												print(F"""{call}: {func(__lowerCAmelCase			)} -- {timing} seconds"""			)

						for value in (262_144, 1_125_899_906_842_624, 1_267_650_600_228_229_401_496_703_205_376):
												for func in (num_digits, num_digits_fast, num_digits_faster):
																		benchmark_a_function(__lowerCAmelCase				,	__lowerCAmelCase			)
												print()


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		benchmark()
