Skip site navigation (1) Skip section navigation (2)

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:49
Message-ID: 20070919223149.1F904753E4C@cvs.postgresql.org (view raw or flat)
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.

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        float.c (r1.150 -> r1.151)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/float.c?r1=1.150&r2=1.151)

pgsql-committers by date

Next:From: Neil ConwayDate: 2007-09-19 22:31:51
Subject: pgsql: Prevent corr() from returning the wrong results for negative
Previous:From: User KockaDate: 2007-09-19 19:12:34
Subject: jdbccache - jdbccache:

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group