Re: Greatest Common Divisor - Mailing list pgsql-hackers

From Vik Fearing
Subject Re: Greatest Common Divisor
Date
Msg-id 4c2a91c8-62e4-af28-5ea7-caf7726d9793@2ndquadrant.com
Whole thread Raw
In response to Re: Greatest Common Divisor  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: Greatest Common Divisor  (Dean Rasheed <dean.a.rasheed@gmail.com>)
List pgsql-hackers
On 20/01/2020 11:28, Dean Rasheed wrote:
> Looking at the docs, I think it's worth going a little further than
> just saying what the acronyms stand for -- especially since the
> behaviour for zero inputs is an implementation choice (albeit the most
> common one). I propose the following:
>
> +       <entry>
> +        greatest common divisor — the largest positive number that
> +        divides both inputs with no remainder; returns <literal>0</literal> if
> +        both inputs are zero
> +       </entry>
>
> and:
>
> +       <entry>
> +        least common multiple — the smallest strictly positive number
> +        that is an integer multiple of both inputs; returns
> <literal>0</literal>
> +        if either input is zero
> +       </entry>
>
> (I have tried to be precise in my use of terms like "number" and
> "integer", to cover the different cases)


In that case should lcm be "...that is an integral multiple..." since
the numeric version will return numeric?


Other than that, I'm happy with this change.

-- 

Vik Fearing




pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: SLRU statistics
Next
From: Andres Freund
Date:
Subject: Re: Physical replication slot advance is not persistent