Re: Greatest Common Divisor

Поиск
Список
Период
Сортировка
От Vik Fearing
Тема Re: Greatest Common Divisor
Дата
Msg-id 4998d2c6-ba16-e6eb-df0c-e5fbf234d52d@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Greatest Common Divisor  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On 04/01/2020 09:35, Fabien COELHO wrote:
>>> I'm unsure about gcd(INT_MIN, 0) should error. Possibly 0 would be
>>> nicer?
>>
>>
>> What justification for that do you have?
>
> ISTM that the current implementation has:
>
>   \forall int4 n, n \neq MIN_INT4, \gcd(n, 0) = 0 ?
>
> In which case applying the same rule for min int seems ok. 


No, gcd(n, 0) = n.

-- 

Vik Fearing




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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: Greatest Common Divisor
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: Greatest Common Divisor