Hello, GSL uses the Welford algorithm, which is based on recurrence relations for mean and variance. See
https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford%27s_online_algorithm Source code here: https://git.savannah.gnu.org/cgit/gsl.git/tree/statistics/mean_source.c https://git.savannah.gnu.org/cgit/gsl.git/tree/statistics/variance_source.c Reference: Welford, B. P. (1962). "Note on a method for calculating corrected sums of squares and products". /Technometrics <https://en.wikipedia.org/wiki/Technometrics>/. *4* (3): 419–420. doi <https://en.wikipedia.org/wiki/Doi_(identifier)>:10.2307/1266577 <https://doi.org/10.2307%2F1266577>. JSTOR <https://en.wikipedia.org/wiki/JSTOR_(identifier)> 1266577 <https://www.jstor.org/stable/1266577>. Patrick On 12/9/20 5:23 PM, Dante Doménech wrote: > Hello. > It's a fast question. When the library calculates mean value, variance and > others, in order to sum, does it use the kahan ( if yes, normal or second > order ), or pairwise summation or something else? > Thanks for your help.