Floating Point Limitations [duplicate]

I think it reflects more on your understanding of floating point types than on Python. See my article about floating point numbers (.NET-based, but still relevant) for the reasons behind this “inaccuracy”. If you need to keep the exact decimal representation, you should use the decimal module.

Leave a Comment