Skip to content
/ smale Public

Smale's alpha theory for certifiable numerical root finding.

License

Notifications You must be signed in to change notification settings

cswiercz/smale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smale

A Python implementation of Smale's alpha theory for numerical root finding.

>>> from smale import smale_newton
>>> f = lambda x: x**3 - 1
>>> df = [lambda x: 3*x**2, lambda x: 6*x, lambda x: 6]
>>> smale_newton(f, 1.1, df)
1.0
>>> smale_newton(f, -0.5 + 1.j, df)
(-0.5+0.8660254037844386j)
>>> smale_newton(f, -0.5 - 1.j, df)
(-0.5+0.8660254037844386j)

Installation

Smale depends on the following Python packages:

  • numpy
  • scipy
  • pytest

For a local install run:

$ cd /path/to/smale
$ python setup.py install --user

(Omit --user for a system-wide installation.)

Testing

Use pytest at the top-level directory to run tests:

$ cd /path/to/smale
$ pytest

About

Smale's alpha theory for certifiable numerical root finding.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages