Hi, I want to use statistical functions, such as variance(), stddev() and covar_samp(), to compute some basic statistics of my data. I have strict requirement for the numerical accuracy of the results. So, I want to know whether the implementation of these functions are numerically stable. For example, variance can be computed as sum(x^2)/n - sum(x)^2/n^2. But this computation can lead to serious accuracy problems with double precision. Can anybody shed lights on what algorithms are used to implement these functions and whether they are numerically stable? Cheers, Yuanyuan -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general