| Crates.io | fnir |
| lib.rs | fnir |
| version | 0.1.1 |
| created_at | 2024-12-26 15:14:34.431435+00 |
| updated_at | 2024-12-26 15:19:56.109046+00 |
| description | Fast numerical integration rules, like tanh-sinh quadrature |
| homepage | |
| repository | https://github.com/TileHalo/fnir |
| max_upload_size | |
| id | 1495694 |
| size | 66,278 |
FNIR provides various numerical integration algorithms for use.
Add the following under [dependencies] in your cargo.toml
fnir = 0.1.1
To use for example the Michalski-Mosig variant of $\tanh\sinh$ quadrature include the following:
use fnir::{Integral, quadrature::{TanhSinh}};
...
let integrator = TanhSinh::new();
let func = |x: f64| f64::powi(x, 2);
let result = integrator.integrate(func, Some(0), Some(1)); // Ok(0.3333...)
WARNING: This project is in early stages and until 1.0.0 subject to breaking chances etc.
This crate can be used to integrate integrals in the form $\int_a^b f(x) dx$ where $a, b \in \R$ and $f: \R \to B \subset \C$, semi-infinite integrals where either $a$ or $b$ is infinite and infinite intervals (both are infinite).
Currently used and planned quadratures are:
Planned future features include the following:
In some distant future the following would also be nice:
Feel free to submit bug reports, feature requests, and the best of all, pull requests to those issues.