Crates.io | root1d |
lib.rs | root1d |
version | 0.4.0 |
source | src |
created_at | 2022-04-15 21:27:32.89135 |
updated_at | 2024-07-20 09:05:59.324057 |
description | One dimensional root finding algorithms |
homepage | https://github.com/Chris00/rust-root1d |
repository | https://github.com/Chris00/rust-root1d |
max_upload_size | |
id | 568709 |
size | 131,584 |
This crate provides algorithms over a generic type T
to find roots
of functions T
→ T
. It is readily usable for T
being f64
and
f32
. Activating the feature rug
, one can also use it with
rug::Float
and rug::Rational
.
use root1d::toms748;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let root = toms748(|x| x*x - 2., 0., 2.).rtol(1e-10).root()?;
println!("root: {}", root);
Ok(())
}
For more information, consult the documentation of the latest release.
#![no_std]
when declared with default-features = false
.