pub struct KahanSum { /* private fields */ }Expand description
pandas’ compensated running sum: its cython group_sum, group_mean
and group_cumsum add each float as y = v - comp; t = sum + y; comp = t - sum - y; sum = t (Kahan), comp reset to 0 where it is NaN
(an inf added; GH#53606). A plain += fold differs from it in the last
bits - groupby sum of ten 0.1 is 1.0 in pandas, 0.9999999999999999
naively (br-frankenpandas-xhogl).
Implementations§
Trait Implementations§
impl Copy for KahanSum
impl StructuralPartialEq for KahanSum
Auto Trait Implementations§
impl Freeze for KahanSum
impl RefUnwindSafe for KahanSum
impl Send for KahanSum
impl Sync for KahanSum
impl Unpin for KahanSum
impl UnsafeUnpin for KahanSum
impl UnwindSafe for KahanSum
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