Re: BUG #19340: Wrong result from CORR() function

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: BUG #19340: Wrong result from CORR() function
Дата
Msg-id 4ab9867066e9545dd1a7e835a480bb0ecbe1a00d.camel@cybertec.at
обсуждение исходный текст
Ответ на BUG #19340: Wrong result from CORR() function  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #19340: Wrong result from CORR() function
Список pgsql-bugs
On Tue, 2025-12-02 at 07:57 +0000, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference:      19340
> Logged by:          Oleg Ivanov
> Email address:      o15611@gmail.com
> PostgreSQL version: 18.1
> Operating system:   all
> Description:
>
> postgres=# SELECT corr( 0.09 , 0.09000001 ) FROM generate_series(1,24) ;
>  corr
> ------
>
> (1 row)
>
> If argument is the constant, function CORR() must give a 0 or NaN.
> Consequences of this bug: statistic functions are used to make business
> descision. Wrong and completely different results can lead to make mistakes.

The documentation is pretty clear about that:

  In all cases, null is returned if the computation is meaningless, for example when N is zero.

Yours,
Laurenz Albe



В списке pgsql-bugs по дате отправления: