Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Fast drop-in replacement for

Project Description

Please note: cdecimal has been integrated into CPython 3.3, where it supersedes the pure Python version: import decimal will automatically import the C version. Performance has been improved further, so the cdecimal version shipped with CPython 3.3 is significantly faster for numerical workload than cdecimal-2.3. If you need maximum decimal computing performance, you should solely use that Python version.

cdecimal is a fast drop-in replacement for the decimal module in Python’s standard library for Python versions 2.5 up to 3.2. It provides a complete implementation of Mike Cowlishaw/IBM’s General Decimal Arithmetic Specification.

Since cdecimal is compatible with decimal, the official documentation is valid:

For the few remaining differences, see:

NOTE: The safest way to get cdecimal is to use the download URL and verify the sha256sum:

d737cbe43ed1f6ad9874fb86c3db1e9bbe20c0c750868fde5be3f379ade83d8b cdecimal-2.3.tar.gz

Do not necessarily trust the above checksum. Use a search engine to ensure that it is identical to the one in the release announcement of cdecimal-2.3.

Release History

This version
History Node


Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers