Python's Fraction data type is an excellent way to do exact money calculations and largely beats Decimal in terms of simplicity, accuracy and safety. Clearly not in terms of speed, though, given the cdecimal accelerator in Py3.3+.
Quicktions is an adaptation of the original fractions module (as included in CPython 3.5) that is compiled and optimised with Cython into a fast, native extension module.
Compared to the standard library fractions module in Py2.7 and Py3.4, quicktions is currently about 10x faster, and still about 6x faster than the current version in Python 3.5. It's also about 15x faster than the (Python implemented) decimal module in Py2.7.
Package Version | Update ID | Released | Package Hub Version | Platforms | Subpackages |
---|---|---|---|---|---|
1.11-bp156.3.4 info | GA Release | 2023-12-07 | 15 SP6 |
|
|
1.11-bp155.2.12 info | GA Release | 2023-05-22 | 15 SP5 |
|
|
1.11-bp154.1.26 info | GA Release | 2022-05-09 | 15 SP4 |
|
|
1.11-bp153.1.22 info | GA Release | 2021-03-06 | 15 SP3 |
|
|
1.11-bp152.1.6 info | GA Release | 2020-04-17 | 15 SP2 |
|
|
1.6-bp151.1.3 info | GA Release | 2019-07-17 | 15 SP1 |
|
|