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+.
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.
For documentation, see the Python standard library’s fractions module:
https://docs.python.org/3.5/library/fractions.html
ChangeLog
1.4 (2017-09-16)
Rebuilt using Cython 0.26.1 to improve support of Python 3.7.
1.3 (2016-07-24)
repair the faster instantiation from Decimal values in Python 3.6
avoid potential glitch for certain large numbers in normalisation under Python 2.x
1.2 (2016-04-08)
change hash function in Python 2.x to match that of fractions.Fraction
1.1 (2016-03-29)
faster instantiation from float values
faster instantiation from Decimal values in Python 3.6
1.0 (2015-09-10)
Fraction.imag property could return non-zero
parsing strings with long fraction parts could use an incorrect scale
0.7 (2014-10-09)
faster instantiation from float and string values
fix test in Python 2.x
0.6 (2014-10-09)
faster normalisation (and thus instantiation)
0.5 (2014-10-06)
faster math operations
0.4 (2014-10-06)
enable legacy division support in Python 2.x
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
Built Distributions
Hashes for quicktions-1.4-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b86989155c0b2d4c653c6cbd2c10bbf4f6eb1dbf03458e810e1a0e3deaaa57e4 |
|
MD5 | 5e27962fcccbf2e21e3bfb857ff38674 |
|
BLAKE2b-256 | 85e8264ff27b6330293ed907e9875e4b865b5af229ca873204ffa0229cb59b74 |
Hashes for quicktions-1.4-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 242e9d796ea88fba47380928a624d1c58197f250383f55782f3b7f1928a1d93d |
|
MD5 | 26531a0d37fd1f83c84e0af71e45e15e |
|
BLAKE2b-256 | 66247847ef4461ca3c325bf64429ad4d595a4cb9ab2cb091ad3ad9a011aa1987 |
Hashes for quicktions-1.4-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f81d2b8ea99ffa479162e56dc13f57dded6b6f2d88ce9d47f6189d2cfe43970 |
|
MD5 | b8018671d27870c9dad451b0e04226e1 |
|
BLAKE2b-256 | 9271903512020358cd776293aa965b433ee6bbe4f7d1299ccaf84354e4681b56 |
Hashes for quicktions-1.4-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d6b492e1a6b892f21e60671924e12e1924ef4dfb2efc9bc5e6a2b9f7487024e |
|
MD5 | d35c9fbde6ff215873deb5e2504665e4 |
|
BLAKE2b-256 | c99e67538b5ccfd0f980d5be59e9089e68a037a79121d3c0ab3208abdd3b95d1 |
Hashes for quicktions-1.4-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95a0cf3679d851379fe480a81dbfa93ce90e4ce2f2d08dbfdbf3278e13a4df61 |
|
MD5 | 90e4e1342e620a8e98bcd9d60ac724cd |
|
BLAKE2b-256 | f02155c5bb5b515fcc759f220700172e92567edf46b19b7bd12bb8fff69bbd6a |
Hashes for quicktions-1.4-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cec8f9ffae3c1fe227ce1935630e680e94a7aa796533ec85b6acacab9852031 |
|
MD5 | 59b44a79edf3013e817f27eccc67e182 |
|
BLAKE2b-256 | 7ab723e86754328ef811ebd7e70e5b4dcf56ae6aa9ad4fe19ef8f4c89ec11423 |
Hashes for quicktions-1.4-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a644ee950e02f182c4bf2ddbca5cb17f470f32eb4dc0135ef519c6c644bc414 |
|
MD5 | 6e061b5f33c4a4cae8f71406d43b578b |
|
BLAKE2b-256 | 429f47ced36ceba305e477772430e1f0a4e6e362ad5d477a59ed485a139330c3 |
Hashes for quicktions-1.4-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc857ce186f495a970f243e397d2d4a5ce1fce5665c6372ecc049a1357ebf5ac |
|
MD5 | f7a116065084bb72bba91822e27d5094 |
|
BLAKE2b-256 | 2b13de03b9ddcb2b1baee3144fb59ee9a0d175c595423b243f30de6857bcfffa |
Hashes for quicktions-1.4-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43f7a81247e66ff08f58ba6c8a43968f00be729b687f5c1a3d15b8e549d4900e |
|
MD5 | da285de149f0fa67a0a216ff0c3ac894 |
|
BLAKE2b-256 | c8d197be48301cd00e69fb194d23e11641aad0382c2a49fa97a11d3bfbdf1245 |
Hashes for quicktions-1.4-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d56bce09c4bf27806a4d9dd7f0bee41523303a30cbb6567ffd504e6bd88cb74 |
|
MD5 | adeeef51be074fed6ea69fcfe63f58b6 |
|
BLAKE2b-256 | b2772762710408b93b079ccf47666abea72bd01f3395020ed705bc71e3b27924 |
Hashes for quicktions-1.4-cp34-cp34m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc929709b6f36112836277133846e8c6269aee24a2cf78f10f36ff04306982b3 |
|
MD5 | 9cf4dd8ac3dddeedcc2615d058a519e3 |
|
BLAKE2b-256 | e3934cb97c21e8fa46ebccacacc520d8d462f9a50c79235d83032ef66e083b6a |
Hashes for quicktions-1.4-cp33-cp33m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ed670819ba16518ffc978a089b98fccf558f0bbe985a7ece4f409aa07698520 |
|
MD5 | 072b8d9fd6fb05cd28866434fdeb8b45 |
|
BLAKE2b-256 | f71c19d1a08ecf9da30c47748725a8dbc8974fe597da7826c148ffb62ceb8206 |
Hashes for quicktions-1.4-cp33-cp33m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfbe24bb25363b0e340c75704f840057d2627e5f9abf3aeae23d313b00c7533b |
|
MD5 | 87f99d13a5ebd23819e9062fa8e6ea5c |
|
BLAKE2b-256 | bd5e5b0b334087d763fda6c75ce4fb009f0165109dc3d28030a0a968cd7ed9c0 |
Hashes for quicktions-1.4-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b167e3b498d9ef00c241114bae530b2ade78d65275568363d5369cfa1bb5f00 |
|
MD5 | 8dc8de50399c543b3cf7fd560d8fe3b5 |
|
BLAKE2b-256 | 09cc3bfc0408a3249ebc31ae9b31413dba489027c4ce00058d4de6547c1ab273 |
Hashes for quicktions-1.4-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 014a04951034602f2ab70c8e258643f63f7ffeabee03537961cbd8d71a400ca1 |
|
MD5 | 83948b5969a2c85fb1bdf722cd559ae9 |
|
BLAKE2b-256 | e402fc4710f421f664741ba2cc29a94a32479542430cbd14f7887410e460bfe1 |
Hashes for quicktions-1.4-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 259b1bb520573b07d23ba733b9e636d060f19e967989f23d61633d07c3a5de43 |
|
MD5 | c59e0bb488705cd10d5cadbea3db35b8 |
|
BLAKE2b-256 | 40a7fbf420c693bbd97fbd7fbd0ca19a3641a995eb47694708fb0ef47a3df310 |
Hashes for quicktions-1.4-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c568cefaa0065739106662089eab2405f8a5ee2bae33ac63a406a5500290003 |
|
MD5 | 65e7838ebc534018e0e46f540bc1a077 |
|
BLAKE2b-256 | e747977ae6931fc5acc09e33068234fcb9d033c14407c8374cba1ab612bad508 |
Hashes for quicktions-1.4-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4707a505a0ffbda99b957176384592730b26ec7f231a240f48f473b4fa2be38d |
|
MD5 | 0016d6eb6d46cf15a6cf0f632d1ddd04 |
|
BLAKE2b-256 | 5fcc7c37859dfd9c9c8df6a787ff078479014f78e888751f0095274c7f8751c0 |
Hashes for quicktions-1.4-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3765122b2049c1820cc25809558b86c9f618698c02190563115a09cce46222d |
|
MD5 | 2859f639d1e8738a9fa37b517326b7e3 |
|
BLAKE2b-256 | 3aabea830c5a5cbf599b72df83c340bb4f742e6b0cff32ba09c39cd027c7f26d |
Hashes for quicktions-1.4-cp26-cp26mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba37e1c706b9cbb4c5aa492edd721ba14892d26886b43ea8f0a77128a5eaa027 |
|
MD5 | c50c447fcbec3819ca084e88ba0792c6 |
|
BLAKE2b-256 | aa346d7b395d10ffdb6f0ffc5e5c5f1508317d2a04eade5eabede0c84f93f9e2 |
Hashes for quicktions-1.4-cp26-cp26mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20679a262b4c624d1da0016327c64ff11530f6638cb1af75bd5a9840b6d67512 |
|
MD5 | 59d03e7b2400c401766462b79b906bbf |
|
BLAKE2b-256 | e1dd01ddc9e3c32482fe805f5144892a0c3b22ca4c741bff0d83a5b5c75665f4 |
Hashes for quicktions-1.4-cp26-cp26m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4369db6961a276147cca834726fa71018b2468c20e8be136bb5d9342762ece9 |
|
MD5 | 76cf89200092af00461bd9070d15cead |
|
BLAKE2b-256 | 0f0ee6aa7be241f7ea318dc766771d63a2e857a01ffa5914ae52e4b43fb3c285 |
Hashes for quicktions-1.4-cp26-cp26m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25a9c470e7aeead7a4ebf9902405cac08c25bcccff29f9170d1bb7eff22019b6 |
|
MD5 | 18565eae00c04d82861dcce808e1da69 |
|
BLAKE2b-256 | af824337785bab3dddd01ba95de1d3dcc5ffe7a6c98b8ff2638dcec613dbbc3d |