





"""simple docstring"""




def 						UpperCAmelCase__		(     _UpperCAmelCase					):






  """simple docstring"""





  try:
    A_  :       List[Any]										=  float(_UpperCAmelCase					)
  except ValueError:
    raise ValueError('Please enter a valid number'					)
  A_  :       int										=  decimal - int(_UpperCAmelCase					)
  if fractional_part == 0:
    return int(_UpperCAmelCase					), 1
  else:
    A_  :       Dict										=  len(str(_UpperCAmelCase					).split('.'					)[1]					)
    A_  :       str										=  int(decimal * (10**number_of_frac_digits)					)
    A_  :       int										=  10**number_of_frac_digits
    A_						,       A_  :       Dict										=  denominator, numerator
    while True:
      A_  :       List[str]										=  dividend % divisor
      if remainder == 0:
        break
      A_						,       A_  :       Dict										=  divisor, remainder
    A_						,       A_  :       str										=  numerator / divisor, denominator / divisor
    return int(_UpperCAmelCase					), int(_UpperCAmelCase					)


if __name__ == "__main__":
   print(F"{decimal_to_fraction(2) = }")
   print(F"{decimal_to_fraction(89.0) = }")
   print(F"{decimal_to_fraction('67') = }")
   print(F"{decimal_to_fraction('45.0') = }")
   print(F"{decimal_to_fraction(1.5) = }")
   print(F"{decimal_to_fraction('6.25') = }")
   print(F"{decimal_to_fraction('78td') = }")






"""simple docstring"""




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available


lowerCamelCase_     :						int						=					{}


try:
   if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowerCamelCase_     :						Tuple						=					['MLukeTokenizer']

if TYPE_CHECKING:
   try:
      if not is_sentencepiece_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_mluke import MLukeTokenizer


else:
   import sys

   lowerCamelCase_     :						List[str]						=					_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)