>>> mpf('1e400e2')
mpf('9.9999999999999997e+399')
>>> mpf('1e400f2')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\Python312\Lib\site-packages\mpmath\ctx_mp_python.py", line 69, in __new__
val = cls.mpf_convert_arg(val, prec, rounding, base)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\mpmath\ctx_mp_python.py", line 77, in mpf_convert_arg
if isinstance(x, str): return from_str(x, prec, rounding, base)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\mpmath\libmp\libmpf.py", line 1292, in from_str
man, exp = str_to_man_exp(x, base)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\mpmath\libmp\libmpf.py", line 1239, in str_to_man_exp
exp = int(parts[1])
^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '400f2'
mpf('1e400e2') should expected to throw a ValueError exception.
mpf('1e400e2')should expected to throw a ValueError exception.