'''simple docstring'''


import math
from timeit import timeit


def 					_lowerCamelCase    (      lowerCamelCase_					:							int   ):



     """simple docstring"""





     UpperCAmelCase_							:   str   =      0
     UpperCAmelCase_							:   Any   =      abs(lowerCamelCase_   )
     while True:
          UpperCAmelCase_							:   Optional[Any]   =      n // 10
          digits += 1
          if n == 0:
               break
     return digits


def 					_lowerCamelCase    (      lowerCamelCase_					:							int   ):



     """simple docstring"""





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


def 					_lowerCamelCase    (      lowerCamelCase_					:							int   ):



     """simple docstring"""





     return len(str(abs(lowerCamelCase_   )   )   )


def 					_lowerCamelCase    (      ):



     """simple docstring"""





     from collections.abc import Callable

     def benchmark_a_function(lowerCamelCase_					:							Callable	,     lowerCamelCase_					:							int   ) -> None:
          UpperCAmelCase_							:   Any   =      F'''{func.__name__}({value})'''
          UpperCAmelCase_							:   Dict   =      timeit(F'''__main__.{call}'''	,     setup='import __main__'   )
          print(F'''{call}: {func(lowerCamelCase_   )} -- {timing} seconds'''   )

     for value in (262144, 1125899906842624, 1267650600228229401496703205376):
          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()







'''simple docstring'''


def 					_lowerCamelCase    (      lowerCamelCase_					:							str   ):



     """simple docstring"""





     UpperCAmelCase_							:   str   =      str(lowerCamelCase_   ).strip()
     if not oct_string:
          raise ValueError('Empty string was passed to the function'   )
     UpperCAmelCase_							:   Tuple   =      oct_string[0] == '-'
     if is_negative:
          UpperCAmelCase_							:   Tuple   =      oct_string[1:]
     if not oct_string.isdigit() or not all(0 <= int(lowerCamelCase_   ) <= 7 for char in oct_string   ):
          raise ValueError('Non-octal value was passed to the function'   )
     UpperCAmelCase_							:   str   =      0
     for char in oct_string:
          UpperCAmelCase_							:   List[Any]   =      8 * decimal_number + int(lowerCamelCase_   )
     if is_negative:
          UpperCAmelCase_							:   List[Any]   =      -decimal_number
     return decimal_number


if __name__ == "__main__":
 from doctest import testmod

 testmod()






