I am getting the following unexpected result when I do arithmetic with small numbers in Python:
>>> sys.float_info sys.float_info(max=1.797693134862
you can handle those. note that
>>> 1.e-17 == 0 False
and
>>> 1.e-17 + 1.e-18 1.1e-17
you simply cannot handle 1-1e-17, because the mantissa won't fit in the finite precision