


import math
from timeit import timeit






def 		lowercase_(  SCREAMING_SNAKE_CASE_     ):


  '''simple docstring'''

  lowerCamelCase			: str   =    0
  lowerCamelCase			: Tuple   =    abs(SCREAMING_SNAKE_CASE_     )
  while True:
    lowerCamelCase			: Dict   =    n // 10
    digits += 1
    if n == 0:
      break
  return digits






def 		lowercase_(  SCREAMING_SNAKE_CASE_     ):


  '''simple docstring'''

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






def 		lowercase_(  SCREAMING_SNAKE_CASE_     ):


  '''simple docstring'''

  return len(str(abs(SCREAMING_SNAKE_CASE_     )     )     )






def 		lowercase_(  ):


  '''simple docstring'''

  from collections.abc import Callable

  def benchmark_a_function(SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_     ) -> None:
    lowerCamelCase			: Any   =    f"""{func.__name__}({value})"""
    lowerCamelCase			: str   =    timeit(f"""__main__.{call}"""				,						setup="import __main__"     )
    print(f"""{call}: {func(SCREAMING_SNAKE_CASE_     )} -- {timing} seconds"""     )

  for value in (262144, 1125899906842624, 1267650600228229401496703205376):
    for func in (num_digits, num_digits_fast, num_digits_faster):
      benchmark_a_function(SCREAMING_SNAKE_CASE_				,						SCREAMING_SNAKE_CASE_     )
    print()


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      benchmark()







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


_snake_case					=					{'''configuration_hubert''': ['''HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''HubertConfig''']}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _snake_case					=					[
       '''HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''HubertForCTC''',
       '''HubertForSequenceClassification''',
       '''HubertModel''',
       '''HubertPreTrainedModel''',
   ]


try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _snake_case					=					[
       '''TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''TFHubertForCTC''',
       '''TFHubertModel''',
       '''TFHubertPreTrainedModel''',
   ]

if TYPE_CHECKING:
   from .configuration_hubert import HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, HubertConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_hubert import (
          HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          HubertForCTC,
          HubertForSequenceClassification,
          HubertModel,
          HubertPreTrainedModel,
      )

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_hubert import (
          TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFHubertForCTC,
          TFHubertModel,
          TFHubertPreTrainedModel,
      )


else:
   import sys

   _snake_case					=					_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



