An open source method of characteristics neutron transport code.
|
Utility function for the accurate pairwise sum of a list of floating point numbers. More...
Go to the source code of this file.
Functions | |
template<typename T , typename L > | |
double | pairwise_sum (T *vector, L length) |
Performs a pairwise sum of an array of numbers. More... | |
Utility function for the accurate pairwise sum of a list of floating point numbers.
|
inline |
Performs a pairwise sum of an array of numbers.
This type of summation uses a divide-and-conquer algorithm which is necessary to bound the error for summations of large sequences of numbers.
vector | an array of numbers |
length | the length of the array |