Struct accurate::Naive
[−]
[src]
pub struct Naive<F>(_);
Naive floating point summation
Examples
use accurate::*; let s = Naive::default() + 1.0 + 2.0 + 3.0; assert_eq!(6.0f64, s.sum());
Trait Implementations
impl<F: Clone> Clone for Naive<F>[src]
fn clone(&self) -> Naive<F>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl<F: Copy> Copy for Naive<F>[src]
impl<F> Add<F> for Naive<F> where F: Float[src]
type Output = Self
The resulting type after applying the + operator
fn add(self, rhs: F) -> Self::Output
The method for the + operator
impl<F> SumAccumulator<F> for Naive<F> where F: Float[src]
fn sum(&self) -> F
The sum of all terms accumulated so far
fn absorb<I>(self, it: I) -> Self where I: IntoIterator<Item=F>
Absorb the items of an iterator into the accumulator Read more
impl<F> From<F> for Naive<F> where F: Float[src]
fn from(x: F) -> Self
Performs the conversion.