Skip to main content

Module kahan

Module kahan 

Source
Expand description

Kahan compensated summation — bit-identical results regardless of platform.

Every floating-point reduction in this library uses Kahan summation to guarantee deterministic results. The compensation term captures rounding error that naive left-to-right summation would lose.

Structs§

KahanAccumulator
Kahan compensated accumulator for f64 values.

Functions§

kahan_sum
One-shot Kahan summation for a slice of f64 values.