struct gpr::linalg::CompensatedSum

Overview

Neumaier summation with explicit product residuals. More…

#include <gpr/linalg/CompensatedSum.h>
 
struct CompensatedSum {
    // fields
 
    double sum = 0.0;
    double corr = 0.0;
 
    // methods
 
    void add(double value);
    void addProduct(double left, double right);
    double value() const;
};

Detailed Documentation

Neumaier summation with explicit product residuals. The two components remain separate across distributed reductions until the final rounding.

Methods

void addProduct(double left, double right)

TwoProductFMA (Ogita, Rump, Oishi, 2005, Algorithm 3.5). The residual is exact when no intermediate operation overflows or underflows.