pgsql: Prevent corr() from returning the wrong results for negative

From: neilc(at)postgresql(dot)org (Neil Conway)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Prevent corr() from returning the wrong results for negative
Date: 2007-09-19 22:31:51
Message-ID: 20070919223151.367FF753E4C@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Prevent corr() from returning the wrong results for negative correlation
values. The previous coding essentially assumed that x = sqrt(x*x), which
does not hold for x < 0.

Thanks to Jie Zhang at Greenplum and Gavin Sherry for reporting this
issue.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
pgsql/src/backend/utils/adt:
float.c (r1.130 -> r1.130.2.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/float.c?r1=1.130&r2=1.130.2.1)

Browse pgsql-committers by date

  From Date Subject
Next Message User Fxjr 2007-09-20 13:45:15 npgsql - Npgsql2: Improved connection string parsing.
Previous Message Neil Conway 2007-09-19 22:31:49 pgsql: Prevent corr() from returning the wrong results for negative