Convert decimals to approximate rational expressions
A command-line wrapper around mpmath’s identify.
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
bump the __version__ number,
publish to PyPi and GitHub:
$ make publish
dedec is published under the MIT license.