Skip to main content

sum2

Function sum2 

Source
pub fn sum2(x: &[f64]) -> DoubleDouble
Expand description

Σ xᵢ of f64 values as a double-double, as accurate as if summed in twice the working precision (Sum2 of Ogita, Rump & Oishi, over W = 4 lanes: Algorithm C of Chapter 11.5): |result − Σxᵢ| ≤ γ²_{n+3} Σ|xᵢ| barring overflow. Overflow includes an intermediate step of a 2Sum whose first operand is ±Ω (invariant T1 of Chapter 11.1): there the result may be finite with a relative error of order u.