Struct accurate::sum::NaiveSum [] [src]

pub struct NaiveSum<F>(_);

Naive floating point summation

Examples

use accurate::traits::*;
use accurate::sum::NaiveSum;

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

Trait Implementations

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

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

[src]

Formats the value using the given formatter. Read more

impl<F> SumAccumulator<F> for NaiveSum<F> where
    F: Float
[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 NaiveSum<F> where
    NaiveSum<F>: AddAssign<F>, 
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

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

[src]

Performs the conversion.

impl<F> Add for NaiveSum<F> where
    F: Float
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

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

impl<F> AddAssign<F> for NaiveSum<F> where
    F: Float
[src]

[src]

Performs the += operation.

Auto Trait Implementations

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