Re: Greatest Common Divisor

From: Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Stephen Frost <sfrost(at)snowman(dot)net>, Chapman Flack <chap(at)anastigmatix(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Greatest Common Divisor
Date: 2020-01-20 18:52:51
Message-ID: 4c2a91c8-62e4-af28-5ea7-caf7726d9793@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 &mdash; 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 &mdash; 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2020-01-20 19:00:14 Re: Physical replication slot advance is not persistent
Previous Message Tomas Vondra 2020-01-20 18:45:46 Re: SLRU statistics