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.8 (2018-12-26)
Faster mod and divmod calculation.
1.7 (2018-10-16)
Faster normalisation and fraction string parsing.
Add support for Python 3.7.
Built using Cython 0.29.
1.6 (2018-03-23)
Speed up Fraction creation from a string value by 3-5x.
Built using Cython 0.28.1.
1.5 (2017-10-22)
Result of power operator (**) was not normalised for negative values.
Built using Cython 0.27.2.
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.8-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94acf83a1b81b6a722d86a86df0e826840ce140e15f9f29f6d463a4b71dc45eb |
|
MD5 | bf4d6d2273a18dacfbcab6a4bf5f1c50 |
|
BLAKE2b-256 | a64ce2359ebb2ec571d4086029a8b7e4c42ebd2079c0633eedbe4a1ca05a4f55 |
Hashes for quicktions-1.8-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 100457a41321f162448198dde598f1b884087c9b0fb6e2fe2c215c914b2eac70 |
|
MD5 | a93fe8cb86eb5e120a98d6b34ebab3a0 |
|
BLAKE2b-256 | d951eea1fcc015541361e655e385e0705d510fc09ca7c09fb2c025c2d7f37479 |
Hashes for quicktions-1.8-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56590537b4d072d84eaf4817f2c1cbdb515b1e4fa97733fbb9b8bd400d5a7142 |
|
MD5 | 9b7290dae8843f23ed576006b7467b41 |
|
BLAKE2b-256 | 1a825753e0514bf09d3c71d9fa8c6adac003be1d39f5ba6aba51d7f23414aad2 |
Hashes for quicktions-1.8-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9311bc2be654e1a32a900261c2fd98a21cc5ba3a648d8fe04094196d456b2cc9 |
|
MD5 | 833b26b4d71344831d7d598f4a52ad64 |
|
BLAKE2b-256 | ee27a60d01a1f0d60f8a3d6655e8118c4d01a6f2f377d976f909f6a9614ef665 |
Hashes for quicktions-1.8-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16f0165a31d74245f9d7bb65f2115d13efe90d968b3b044a2ff2e2e1e9af43c3 |
|
MD5 | d43d35300997f639b0285c5b5bec493e |
|
BLAKE2b-256 | a0ae3c801aa521f8472b594e2cae41055d982aa84d5f6c043f40070dc4061279 |
Hashes for quicktions-1.8-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 997a188b4097329694109345c8463efcd155941c70d45386c7e09bd560d8dc1d |
|
MD5 | 1c64cb7bd181ac7ce6a429c75aa9964d |
|
BLAKE2b-256 | 7a7a279644b222bf82044c2e407cae090a58eda3d62ba7c6ec1e8670bb40da84 |
Hashes for quicktions-1.8-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3326907fef8bb68af1d582d0e8677563b98a84ef997232024eb020193ab74576 |
|
MD5 | efce57c12a2ed4575cd7c259a4b96054 |
|
BLAKE2b-256 | 8fea0c662b8095571aff64062d31a16973e81dd08ee32b8a9c700c495c1c9fa3 |
Hashes for quicktions-1.8-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8acb6afb0e33024bf73629f827930fddc1d02e4268167e0972050487217072db |
|
MD5 | e543bf2c696fd63c140a496c47328673 |
|
BLAKE2b-256 | b027b37c9023dc6f04f9120683c7fc46ab781be03f185ff10f0bc9abc8e6fea7 |
Hashes for quicktions-1.8-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c6d92285e0d29b3ac13e052dc57a531d77a875bd0dbedfab78391f114db98a1 |
|
MD5 | 2ed6e2da423ce47221e3befca86de143 |
|
BLAKE2b-256 | 08d7002f2d2519e557134df5c36d7a99fa00a97d967a7a4d579634b619abc325 |
Hashes for quicktions-1.8-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4a0ece0092db61ad3a61d81adf3ff0fdbb45f569000080478b99a0b9372ad34 |
|
MD5 | c4ee2e4a464b69fdc6c4e7904045ecc1 |
|
BLAKE2b-256 | 0a2357d0b4640e61a37fa33c3edb15f47b74410c0b7263bccef33ae0eac9a96f |
Hashes for quicktions-1.8-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 913f14ee541aca216ab181726bf6e98c0dd671cdc56c16da1b1e69acf06fed4d |
|
MD5 | 9f1798b19983ebc3adb2340909ddfc93 |
|
BLAKE2b-256 | 7ab48b23404bf0b5658855da4502a6d2905ea8ccf9037faf493ba2d4b72caf3c |
Hashes for quicktions-1.8-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35e40d8d43424f7a04792dc4c49c9e906c226394caac4e50a6c9f789b44dbe86 |
|
MD5 | fb3ef1ca90749267f49d734fdfbf2f26 |
|
BLAKE2b-256 | 90e98d2164955cf4549be8151755f80ce059d5f957e02152c2505b0f106b434e |
Hashes for quicktions-1.8-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e830b560ba2784a407c646ab7386d92a3f6e7f8795e97a1dc0ce4e3da01ce020 |
|
MD5 | 912b43c502282a758288150bff2f59c1 |
|
BLAKE2b-256 | b4176de9b3420e79b6b8a12e27c91f3fb9dfd1ca23d8e51880fb71e34ef75397 |
Hashes for quicktions-1.8-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f090d59ab84c530d2804f4a06fdeb00bdf84f8cfb796b5fac0b277fc0d3c2b95 |
|
MD5 | 6ec6077ae25f4dc81cc3a9baf04560d2 |
|
BLAKE2b-256 | bb1e4eae72ca94fdc470fd577e119fdc8d2fc4acc9a4a6064a8aae12f5760717 |
Hashes for quicktions-1.8-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7ff72dad63a489063160a1408c72075d32c46cc061b2301b2a44bb57ba4809b |
|
MD5 | 4aa379facd8668d20488fcee96f5d88f |
|
BLAKE2b-256 | ddd6fb7488dee86b40542c87df1a77f47ceb961b1c3d70536f41c9d2d4fe9bec |
Hashes for quicktions-1.8-cp34-cp34m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12745e068da4f095e67ca0503ad891d6cddd8dab3d4bcd55da697ed4f8609f08 |
|
MD5 | 484addb3e978f9eee6e46a511570419f |
|
BLAKE2b-256 | 1262a4ae277a49a74a8021fcded718ac39b7edc2dc2ae36bcf7910bf8171381a |
Hashes for quicktions-1.8-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76f82e18fdc757297ad6ec9f0977eadfdf00c610be6c750f75921abcba88eb6e |
|
MD5 | 7ae7135d9e85a90e71825e3817619ed1 |
|
BLAKE2b-256 | 38396c2e79fd1bc1b70c257896fae8094f40c5fe9b1aed7fc8d729fff6f2eb1b |
Hashes for quicktions-1.8-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32cbd3b4332c0519f6720b946912da17e8fa35dbdada0355ebeb66ccdf0dac89 |
|
MD5 | 417d1c60266134ff79c8ca2651748d3a |
|
BLAKE2b-256 | 3b4e4e42b97ad92b7ad556eb23e7e7d6c331680e805b3222bebb23a08a6a8a44 |
Hashes for quicktions-1.8-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53a043e21cfe6555b712651157a4667c16f24888fff1f1dd9c97f0f6769fe304 |
|
MD5 | 505630d3e0c8a5020a469ed652b3d8b7 |
|
BLAKE2b-256 | 7ae68f45966e12f3a85dd53dd23d04671c59bee696eb4a97edbd32aa0981c666 |
Hashes for quicktions-1.8-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 377e07c97f04ed83e1446ebb7dd652a6248397a3bade8a870bb2e1d8c7665246 |
|
MD5 | b5b32436ff25dfd26b85712d3160744b |
|
BLAKE2b-256 | b9f0c1372e356ce6c10070176432826e00a1f00380b0d7b60d5ca4caef61daac |
Hashes for quicktions-1.8-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b55727b631d68c949deb7acce962a58e398fb4fafa879fb4d7b8d2b8bf948a6f |
|
MD5 | 271b2e63cfbdd18472c7fccb8184b07c |
|
BLAKE2b-256 | dfb6c8223487de4171312f0966b86afe47b90f0f123dd6c0165cda8ec6617de6 |
Hashes for quicktions-1.8-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f669742aea6cb892768305e72e24bfac783bb01793a27165dc2188f9ff24824d |
|
MD5 | ef3f4c45cb5ed327b85597d0ece42ce5 |
|
BLAKE2b-256 | afb484690d52f8690f582a6cd4ab52023265c0c3c84a7c898a3df363babb79b5 |