IMPORTANT: ALPHA STATUS, KNOWN BUGS STILL PRESENT (READ BELOW)
fastinverse is a small python extension for generating code which computes the inverse of a function (which presumably lacks an explicit inverse).
It generates fast C (C99) code for use either tranparently from Python, or for use in external projects.
For calculation of large number of inverse values parallelization through OpenMP is used.
Feel free to enhance modify and make pull request at github.
E.g. do:
pip install --user --upgrade -r http://raw.github.com/bjodah/fastinverse/master/requirements.txt
pip install --user --upgrade http://github.com/bjodah/fastinverse/archive/v0.0.6.tar.gz
(modify to your needs)
Fastinverse currently only generates one kind of solver: invnewton
which is based on table lookup of polynomial coefficient + interpolation + newton iteration refinement.
python invnewton_main.py -y 'tan(x)' -l 5 -o 3 --sample-N 1000 --x-lo -0.7 --x-hi 0.7
Run py.test
- Python
- NumPy
- Sympy
- argh (optional, used for command line arguments in example)
- Cython 0.19 (optional)
- pycompilation (optional: enables use from python)
- pycodeexport (optional: enables use from python)
- symvarsub (optional)
- matplotlib (optional)
Open Source. Released under the very permissive "simplified (2-clause) BSD license". See LICENCE.txt for further details.
Björn Dahlgren, contact (gmail adress): bjodah