Skip to content

num::safe_add

Defined in header <linear/factorization/inverse_diagonal.hpp>

template <class T>
bool safe_add(T &x, T &err, T y, T tolerance = 1e-6);

Perform x += y, track accumulated floating-point error, and verify precision acceptability.