Skip to main content

Convert decimals to approximate rational expressions

Project description


A command-line wrapper around mpmath's identify.

CircleCI codecov Code style: black PyPi Version GitHub stars

You come across the number 0.866025. It looks vaguely familiar but you can't quite point your finger at it? Then dedec is for you.

dedec is a small command-line utility that "de-decimalizes" decimal numbers into approximate rational expressions (with some basic functions).

$ dedec 0.4285714285
3/7   -7.14285297576112E-11
$ dedec 0.866025403
sqrt(3)/2   -7.84438675343059E-10


Python Package Index

dedec is available from the Python Package Index, so simply type

pip install -U dedec

to install or upgrade.


To run the dedec unit tests, check out this repository and type



To create a new release

  1. bump the __version__ number,

  2. publish to PyPi and GitHub:

    $ make publish


dedec is published under the MIT license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dedec, version 0.4.2
Filename, size & hash File type Python version Upload date
dedec-0.4.2-py2.py3-none-any.whl (4.3 kB) View hashes Wheel py2.py3
dedec-0.4.2.tar.gz (3.9 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page