Fast arbitrary precision correctly-rounded decimal floating point arithmetic.
The cdecimal package is a fast drop-in replacement for the decimal module in Python’s standard library. Both modules provide complete implementations of Mike Cowlishaw/IBM’s General Decimal Arithmetic Specification.
Both cdecimal and the underlying library - libmpdec - are extremely well tested. libmpdec is one of the few open source projects with 100% code coverage. cdecimal is rigorously tested against decimal.py.
Typical performance gains are between 30x for I/O heavy benchmarks and 80x for numerical programs. In a database benchmark, cdecimal exhibits a speedup of 12x over decimal.py.
Since cdecimal is compatible with decimal.py, the official documentation is valid. For the few remaining differences, refer to the second link.
The build process requires a working C compiler and a full Python install with development headers. Linux distributions often ship the Python header files as a separate package, called python-dev or python-devel.
Install headers on Debian/Ubuntu:
- sudo apt-get install python-dev
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size pypi_cdecimal-2.3-cp27-none-macosx_10_11_x86_64.whl (135.2 kB)||File type Wheel||Python version cp27||Upload date||Hashes View|
|Filename, size pypi-cdecimal-2.3.tar.gz (90.6 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for pypi_cdecimal-2.3-cp27-none-macosx_10_11_x86_64.whl