Struct accurate::sum::Sum2 [] [src]

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

SumK with two cascaded accumulators

Examples

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

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

References

Based on Ogita, Rump and Oishi 05

Trait Implementations

impl<F: Copy> Copy for Sum2<F>
[src]

impl<F: Clone> Clone for Sum2<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 Sum2<F>
[src]

[src]

Formats the value using the given formatter. Read more

impl<F> SumAccumulator<F> for Sum2<F> where
    F: Float + TwoSum + AddAssign
[src]

[src]

The sum of all terms accumulated so far

[src]

Initial value for an accumulator

[src]

Absorb the items of an iterator into the accumulator Read more

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

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<F> From<F> for Sum2<F> where
    F: Float
[src]

[src]

Performs the conversion.

impl<F> Add for Sum2<F> where
    F: Float + TwoSum
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

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

impl<F> AddAssign<F> for Sum2<F> where
    F: Float + TwoSum + AddAssign
[src]

[src]

Performs the += operation.

Auto Trait Implementations

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