Re: BUG #5428: Discrepency in remainder on mod function.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5428: Discrepency in remainder on mod function.
Дата
Msg-id 15461.1271452285@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #5428: Discrepency in remainder on mod function.  ("Khee Chin" <kheechin@gmail.com>)
Ответы Re: BUG #5428: Discrepency in remainder on mod function.  (Khee Chin <kheechin@gmail.com>)
Список pgsql-bugs
"Khee Chin" <kheechin@gmail.com> writes:
> I'm not certain if this is a bug or an intended behavior.

> I noticed a discrepency in calculating the remainders across pgsql (PG),
> wolframalpha (W) and using Knuth's description of floored division

We follow whatever the C compiler's idea of modulo is.  This is somewhat
standardized, in fact, and I'm not excited about changing it.
Especially not by introducing roundoff-prone double arithmetic into what
had been an exact operation.

            regards, tom lane

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

Предыдущее
От: "Khee Chin"
Дата:
Сообщение: BUG #5428: Discrepency in remainder on mod function.
Следующее
От: Martin von Gagern
Дата:
Сообщение: Re: build error: strlcat/strlcpy used from heimdal libroken.so