postgresql/src/test/regress
Dean Rasheed e954a727f0 Improve the accuracy of floating point statistical aggregates.
When computing statistical aggregates like variance, the common
schoolbook algorithm which computes the sum of the squares of the
values and subtracts the square of the mean can lead to a large loss
of precision when using floating point arithmetic, because the
difference between the two terms is often very small relative to the
terms themselves.

To avoid this, re-work these aggregates to use the Youngs-Cramer
algorithm, which is a proven, numerically stable algorithm that
directly aggregates the sum of the squares of the differences of the
values from the mean in a single pass over the data.

While at it, improve the test coverage to test the aggregate combine
functions used during parallel aggregation.

Per report and suggested algorithm from Erich Schubert.

Patch by me, reviewed by Madeleine Thompson.

Discussion: https://postgr.es/m/153313051300.1397.9594490737341194671@wrigleys.postgresql.org
2018-10-06 11:20:09 +01:00
..
data
expected Improve the accuracy of floating point statistical aggregates. 2018-10-06 11:20:09 +01:00
input Allow multi-inserts during COPY into a partitioned table 2018-08-01 10:23:09 +02:00
output Error position support for defaults and check constraints 2018-08-30 08:20:23 +02:00
sql Improve the accuracy of floating point statistical aggregates. 2018-10-06 11:20:09 +01:00
.gitignore
GNUmakefile Put back parallel-safety guards in plpython and src/test/regress/. 2018-04-10 16:15:04 -04:00
Makefile Fix non-GNU makefiles for AIX make. 2017-11-30 00:57:22 -08:00
parallel_schedule Don't run fast_default regression test in parallel with other tests. 2018-04-20 17:27:56 -04:00
pg_regress_main.c Clean up assorted misuses of snprintf()'s result value. 2018-08-15 16:29:31 -04:00
pg_regress.c Clean up assorted misuses of snprintf()'s result value. 2018-08-15 16:29:31 -04:00
pg_regress.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
README
regress.c Refactor geometric functions and operators 2018-07-29 02:36:29 +02:00
regressplans.sh
resultmap Enable compiling with the mingw-w64 32 bit compiler. 2011-12-10 15:35:41 -05:00
serial_schedule Don't run fast_default regression test in parallel with other tests. 2018-04-20 17:27:56 -04:00
standby_schedule

Documentation concerning how to run these regression tests and interpret
the results can be found in the PostgreSQL manual, in the chapter
"Regression Tests".