quad_gk 1.0.0

Pure rust numerical integration library based on Gauss Kronrod quadrature rule.
Documentation
  • Coverage
  • 20%
    4 out of 20 items documented1 out of 1 items with examples
  • Size
  • Source code size: 60.45 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.42 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 21s Average build duration of successful builds.
  • all releases: 21s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • qdot3/quad_gk
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • qdot3

quad_gk

Fast and precise numerical integration library based on Gauss Kronrod quadrature rule.

Basic usage

use std::sync::Arc;

use quad_gk::*;

let integral: Integral = quad_gk!(
    Arc::new(|x: f64| x.sin() * (-x).exp()),
    0.0..100.0,
);

// estimated relative error in numerical integration is smaller than 1e-6 by default.
assert!(integral.is_ok(1e-6))

More precise calculation

use std::sync::Arc;

use quad_gk::*;

let integral: Integral = quad_gk!(
    Arc::new(|x: f64| x.sin() * (-x).exp()),
    0.0..100.0,
    rel_tol=1e-14,
    max_interval_count=1_000_000,
    coef=GK91,
);

// estimated relative error in numerical integration is smaller than 1e-14!
assert!(integral.is_ok(1e-14))