Message from Python discussions

December 2018

— Yes! Thank you so much! This is exactly what I want!

— 

Language:

python3


Source:
print(round(2018.1 - 2018, 10))
print(round(2018.12 - 2018, 10))


Result:
0.1
0.12

— Actually, didn't see this, but this is pretty much the same.

— Thank you Mario! 😄

— And what is normally handled by format strings

— How about using decimal?

— Why?

— More accurate values

— Give me an example that isn't accurate.

— According to what the OP needs.

— Decimal(2018.1) - Decimal(2018) == Decimal(0.1)

— Same results?