






import math
from timeit import timeit
def       a__						(  A					):
   lowercase__						:	int         = 0
   lowercase__						:	List[Any]         = abs(A					)
   while True:
      lowercase__						:	Dict         = n // 10
      digits += 1
      if n == 0:
         break
   return digits
def       a__						(  A					):
   return 1 if n == 0 else math.floor(math.log(abs(A					)		,				10					) + 1					)
def       a__						(  A					):
   return len(str(abs(A					)					)					)
def       a__						(  ):
   from collections.abc import Callable

   def benchmark_a_function(A		,				A					) -> None:
      lowercase__						:	List[str]         = F'''{func.__name__}({value})'''
      lowercase__						:	int         = timeit(F'''__main__.{call}'''		,				setup="""import __main__"""					)
      print(F'''{call}: {func(A					)} -- {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(A		,				A					)
      print()


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 benchmark()










from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


a    =       {'configuration_nat': ['NAT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'NatConfig']}


try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 a    =       [
     'NAT_PRETRAINED_MODEL_ARCHIVE_LIST',
     'NatForImageClassification',
     'NatModel',
     'NatPreTrainedModel',
     'NatBackbone',
 ]

if TYPE_CHECKING:
 from .configuration_nat import NAT_PRETRAINED_CONFIG_ARCHIVE_MAP, NatConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_nat import (
      NAT_PRETRAINED_MODEL_ARCHIVE_LIST,
      NatBackbone,
      NatForImageClassification,
      NatModel,
      NatPreTrainedModel,
  )

else:
 import sys

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


