pymath
Perform calculations and graphing either on the command line or in the Python repl.
Defines several common math functions not in the python standard library (found in the pymath folder), and also imports the following:
- math
- statistics as stats
- itertools as it
- fractions as frac
- decimal as dec
- matplotlib.pyplot as plt
- numpy as np
Installation
pip install [--user] pymath2
Note: ~/.local/bin
should be in your $PATH
for --user
installs.
Usage
Run an expression from the command line:
> pymath 'factorial(5)+1'
121
Or perform multiple calculations in the Python repl:
> pymath
>>> xgcd(5, 2)
(1, 1, -2)
>>> primes(5)
[2, 3, 5, 7, 11]
>>>
List all available functions:
pymath -l