(More or less) accurate floating point algorithms
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:
- Accurate sum and dot product, based on Ogita, Rump, and Oishi 05
- Online exact summation, based on Zhu and Hayes 10
Usage
Add the accurate
crate as a dependency in your Cargo.toml
:
[]
= "0.3"
Then use it in your program like this:
extern crate accurate;
use *;
use Sum2;
Documentation
Documentation for the latest version of the crate is on docs.rs.
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
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.