Struct accurate::sum::OnlineExactSum [] [src]

pub struct OnlineExactSum<F> { /* fields omitted */ }

Calculates a sum using separate accumulators for each possible exponent

Examples

use accurate::traits::*;
use accurate::sum::OnlineExactSum;

let s = OnlineExactSum::zero() + 1.0 + 2.0 + 3.0;
assert_eq!(6.0f64, s.sum());

References

Based on Zhu and Hayes 10

Trait Implementations

impl<F: Clone> Clone for OnlineExactSum<F>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<F: Debug> Debug for OnlineExactSum<F>
[src]

[src]

Formats the value using the given formatter. Read more

impl<F> SumAccumulator<F> for OnlineExactSum<F> where
    F: Float + TwoSum + IFastSum + FloatFormat + RawExponent
[src]

[src]

Initial value for an accumulator

[src]

The sum of all terms accumulated so far

[src]

Absorb the items of an iterator into the accumulator Read more

impl<F> Add<F> for OnlineExactSum<F> where
    OnlineExactSum<F>: AddAssign<F>, 
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<F> From<F> for OnlineExactSum<F> where
    F: TwoSum + FloatFormat + RawExponent
[src]

[src]

Performs the conversion.

impl<F> Add for OnlineExactSum<F> where
    F: Float + TwoSum + IFastSum + FloatFormat + RawExponent
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<F> Send for OnlineExactSum<F> where
    F: Send
[src]

impl<F> AddAssign<F> for OnlineExactSum<F> where
    F: TwoSum + FloatFormat + RawExponent
[src]

[src]

Performs the += operation.

Auto Trait Implementations

impl<F> Sync for OnlineExactSum<F> where
    F: Sync