Fast fractions data type for rational numbers. Cythonized version of 'fractions.Fraction'.
Project description
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+.
This is an adaptation of the original fractions module (as included in CPython 3.4) 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 5x faster than the current version in Python 3.5. It’s also about 15x faster than the (Python implemented) decimal module in Py2.7.
For documentation, see the Python standard library’s fraction module:
https://docs.python.org/3.4/library/fractions.html
ChangeLog
0.3 (2014-10-05)
minor behavioural fixes in corner cases under Python 2.x (now passes all test in Py2.7 as well)
0.2 (2014-10-03)
cache hash value of Fractions
0.1 (2014-09-24)
initial public release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file quicktions-0.3.tar.gz
.
File metadata
- Download URL: quicktions-0.3.tar.gz
- Upload date:
- Size: 162.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33a88fef4f189d8d23e8ccd7b1a19a7c48ffc466d21927d23c7b0c4b454f6d37 |
|
MD5 | 94df51a650fa7968c7c5e19ea45a7087 |
|
BLAKE2b-256 | 6bd6943b35aab0e607b803738f7bb35f39001d9d71a98120cf986c0e5dd6c4a8 |