C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Functions
exprtk::rtl::vecops::details Namespace Reference

Functions

template<typename T >
void kahan_sum (T &sum, T &error, const T v)
 

Function Documentation

◆ kahan_sum()

template<typename T >
void exprtk::rtl::vecops::details::kahan_sum ( T &  sum,
T &  error,
const T  v 
)
inline

Definition at line 44257 of file exprtk.hpp.

44258 {
44259 const T x = v - error;
44260 const T y = sum + x;
44261 error = (y - sum) - x;
44262 sum = y;
44263 }

Referenced by exprtk::rtl::vecops::sumk< T >::operator()(), and exprtk::rtl::vecops::dotk< T >::operator()().

Here is the caller graph for this function: