identinum

Identify exact expression for decimal.

MIT License

Downloads
99
Stars
9
Committers
1

identinum

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 identinum is for you.

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

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

Installation

identinum is available from the Python Package Index, so simply do

pip install identinum

Testing

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

pytest