3 ms·
Yes it is IEEE-754 specific. I think any binary floating point will have similar pitfalls though. Python has a Decimal type that can represent decimal values e
by TorKlingberg 16y ago
Yes it is IEEE-754 specific. I think any binary floating point will have similar pitfalls though.
Python has a Decimal type that can represent decimal values exactly. It must be imported first though. It is probably much slower than IEEE-754 floating point, but for many uses that is not an issue.
http://docs.python.org/library/decimal.html http://docs.python.org/library/decimal.html