[Python-Dev] Mixing float and Decimal -- thread reboot (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Sun Mar 21 05:40:19 CET 2010
- Previous message: [Python-Dev] Mixing float and Decimal -- thread reboot
- Next message: [Python-Dev] Mixing float and Decimal -- thread reboot
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Mark Dickinson wrote:
Except that float is fixed-width (typically 53 bits of precision), while Decimal allows a user-specified, arbitrarily large, precision;
Yes, but it still has some fixed limit at any given moment, so the result of an operation on Decimals always has the potential to produce an inexact result. It's not like an int or Fraction where the result can expand to whatever size is needed.
-- Greg
- Previous message: [Python-Dev] Mixing float and Decimal -- thread reboot
- Next message: [Python-Dev] Mixing float and Decimal -- thread reboot
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]