Re: Greatest Common Divisor
| От | Chapman Flack |
|---|---|
| Тема | Re: Greatest Common Divisor |
| Дата | |
| Msg-id | 5E08D947.9000902@anastigmatix.net обсуждение |
| Ответ на | Re: Greatest Common Divisor (Fabien COELHO <coelho@cri.ensmp.fr>) |
| Ответы |
Re: Greatest Common Divisor
|
| Список | pgsql-hackers |
On 12/29/19 02:30, Fabien COELHO wrote: >>> C modulo operator (%) is a pain because it is not positive remainder >>> (2 % -3 == -1 vs 2 % 3 == 2, AFAICR). >> >> This does not seem to be the case... > ... > Because I do not trust C modulo as I had a lot of problems with it? :-) If I recall correctly (and I'm traveling and away from those notes), the exact semantics of C's % with negative operands was left implementation-defined until, was it, C99 ? So it might be ok to rely on the specified C99 behavior (whichever behavior that is, he wrote, notelessly) for PG 12 and later, where C99 is expected. Regards, -Chap
В списке pgsql-hackers по дате отправления: