decimal
decimal — Decimal fixed point and floating point arithmetic
Source code: Lib/decimal.py
The decimal
module provides support for fast correctly-rounded decimal floating point arithmetic. It offers several advantages over the float
datatype:
- 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