A package for root computation of functions
Project description
nrp
This is a small package for computing roots of a given function using newton-raphson method.
The user needs to supply an initial root guess, the function as well as the first derivative of the function as callbacks.
Usage
(We are actively adding supporting for passing functions as callback.) Example:
from nrp import newton_raphson
from lptypes import f64, i32
def check():
x0: f64 = 20.0
c: f64 = 3.0
maxiter: i32 = 20
x: f64
x = newton_raphson(x0, c, maxiter)
assert abs(x - 3.0) < 1e-5
check()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nrp-0.0.1.tar.gz
(3.0 kB
view hashes)
Built Distribution
nrp-0.0.1-py3-none-any.whl
(2.8 kB
view hashes)