SymPy, being Python, gets it wrong... but if you use S = sympify to transform the long numbers into SymPy objects it works:
S('9999999999999999.0') - S('9999999999999998.0')
1.0 S('9999999999999999.0') - S('9999999999999998.0')
1.0 In [1]: from decimal import Decimal as D
In [2]: D('9999999999999999.0') - D('9999999999999998.0')
Out[2]: Decimal('1.0')
From docs: Decimal “is based on a floating-point model which was designed with people in mind, and necessarily has a paramount guiding principle – computers must provide an arithmetic that works in the same way as the arithmetic that people learn at school.”