Package for root computation of math 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 support for passing functions as callback.) Example:
from nrp import newton_raphson
from lpython 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.1.tar.gz
(3.0 kB
view details)
Built Distribution
nrp-0.0.1.1-py3-none-any.whl
(2.8 kB
view details)
File details
Details for the file nrp-0.0.1.1.tar.gz
.
File metadata
- Download URL: nrp-0.0.1.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 449239f5aa44184c8c4967577c58fced2ca8e0a9ca2c84e0b9c18d92e329c62d |
|
MD5 | 38f27d15d0614a801a1783a58ff37824 |
|
BLAKE2b-256 | 73c1fd9725644dc726f45f41315b0eec7b669af0a7a039e09d9e2a1618ebc992 |
File details
Details for the file nrp-0.0.1.1-py3-none-any.whl
.
File metadata
- Download URL: nrp-0.0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4a61d366eb75b470781221b3c3a362b8897b47fba34701d507d76e76cb1e64f |
|
MD5 | d79fd3255fced7ae56851311888d9b56 |
|
BLAKE2b-256 | 820c900ca7c24db4617cbaeec72af8fc04f361f9890c2c4fa50a84d1dfd245c5 |