acc
accurate
cargo install accurate
acc

accurate

(More or less) accurate floating point algorithms

by Benedikt Steinbusch

0.3.1 (see all)License:MIT OR Apache-2.0
cargo install accurate
Readme

(More or less) accurate floating point algorithms

Travis build status Documentation: hosted License: Apache License 2.0 or MIT latest GitHub release crate on crates.io

This crate provides several algorithms that implement highly accurate or even guaranteed correct sum and dot product for floating-point numbers without resorting to arbitrary precision arithmetic. These algorithms are available:

Usage

Add the accurate crate as a dependency in your Cargo.toml:

[dependencies]
accurate = "0.3"

Then use it in your program like this:

extern crate accurate;

use accurate::traits::*;
use accurate::sum::Sum2;

fn main() {
  let x = vec![1.0, 2.0, 3.0];
  let s = x.sum_with_accumulator::<Sum2<_>>();
  assert_eq!(6.0f64, s);
}

Documentation

Documentation for the latest version of the crate is on docs.rs.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

GitHub Stars

42

LAST COMMIT

1yr ago

MAINTAINERS

1

CONTRIBUTORS

1

OPEN ISSUES

1

OPEN PRs

0
VersionTagPublished
0.3.1
2yrs ago
0.3.0
4yrs ago
0.2.1
6yrs ago
0.1.1
6yrs ago
No alternatives found
No tutorials found
Add a tutorial