pub struct NaiveSum<F>(/* private fields */);Expand description
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§
Source§impl<F> AddAssign<F> for NaiveSum<F>where
F: Float,
impl<F> AddAssign<F> for NaiveSum<F>where
F: Float,
Source§fn add_assign(&mut self, rhs: F)
fn add_assign(&mut self, rhs: F)
Performs the
+= operation. Read moreSource§impl<F> SumAccumulator<F> for NaiveSum<F>where
F: Float,
impl<F> SumAccumulator<F> for NaiveSum<F>where
F: Float,
impl<F: Copy> Copy for NaiveSum<F>
impl<F> Send for NaiveSum<F>where
F: Send,
Auto Trait Implementations§
impl<F> Freeze for NaiveSum<F>where
F: Freeze,
impl<F> RefUnwindSafe for NaiveSum<F>where
F: RefUnwindSafe,
impl<F> Sync for NaiveSum<F>where
F: Sync,
impl<F> Unpin for NaiveSum<F>where
F: Unpin,
impl<F> UnwindSafe for NaiveSum<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<Acc, F> ParallelSumAccumulator<F> for Acc
impl<Acc, F> ParallelSumAccumulator<F> for Acc
Source§fn into_consumer(self) -> SumConsumer<Self>
fn into_consumer(self) -> SumConsumer<Self>
Turns an accumulator into a consumer