Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chris00/rust-root1d
One dimensional root finding algorithms
https://github.com/chris00/rust-root1d
Last synced: 15 days ago
JSON representation
One dimensional root finding algorithms
- Host: GitHub
- URL: https://github.com/chris00/rust-root1d
- Owner: Chris00
- Created: 2022-02-27T21:46:05.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-20T08:11:01.000Z (4 months ago)
- Last Synced: 2024-10-14T02:08:38.032Z (about 1 month ago)
- Language: Rust
- Size: 104 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Find roots of functions of one variable
=======================================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`][].## Usage
```rust
use root1d::toms748;fn main() -> Result<(), Box> {
let root = toms748(|x| x*x - 2., 0., 2.).rtol(1e-10).root()?;
println!("root: {}", root);
Ok(())
}
```For more information, consult the
[documentation](https://docs.rs/root1d) of the latest release.## Highlights
- Efficient & fully generic code.
- Convenient interface with optional arguments and default termination
criteria.
- Support for non-copy types (for multi-precision numbers) minimizing
the creation of temporary values.
- State of the art root finding algorithm ([Toms748][]) requiring only
few evaluations of the function.
- Compile with `#![no_std]` when declared with `default-features = false`.[`rug::Float`]: https://docs.rs/rug/latest/rug/struct.Float.html
[`rug::Rational`]: https://docs.rs/rug/latest/rug/struct.Rational.html
[Toms748]: https://doi.org/10.1145/210089.210111