Skip to main content

Find roots of scalar functions.

Project description

PyPI Travis CI - Build codecov - Code coverage Read the Docs - Documentation PyPI - Python Version PyPI - License

rootfinding finds roots by bisecting a bracketing interval until the value of the function can be considered sufficiently close to zero. The scheme differs slightly from the implementation of bisection in SciPy: it is better suited for cases where a maximum acceptable residual is a more useful termination criterion than a tolerance for the argument variable, and can lead to fewer function evaluations overall.

The small library also contains functionality to automatically search for a bracket of a root when one is not known. While the library will always start by checking the inputs, it is possible to avoid redundant function calls by providing known values of the function—similarly, objects returned (and exceptions raised) by the library helpfully include function values that may be of interest. rootfinding was first developed as an internal module of our other project Fronts.

To use this library, install rootfinding from PyPI as $ pip install rootfinding. Alternatively, you may copy the rootfinding.py file from the source code directly into your project (you must retain the copyright notice and license).

Documentation is available on Read the Docs.

Project details


Download files

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

Source Distribution

rootfinding-1.0.3.tar.gz (10.7 kB view hashes)

Uploaded Source

Built Distribution

rootfinding-1.0.3-py2.py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page