Re: Greatest Common Divisor
Dean Rasheed <dean.a.rasheed@gmail.com>
From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: Vik Fearing <vik.fearing@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Fabien COELHO <coelho@cri.ensmp.fr>, Stephen Frost <sfrost@snowman.net>, Chapman Flack <chap@anastigmatix.net>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-01-20T20:13:12Z
Lists: pgsql-hackers
On Mon, 20 Jan 2020 at 18:52, Vik Fearing <vik.fearing@2ndquadrant.com> wrote: > > On 20/01/2020 11:28, Dean Rasheed wrote: > > > > + <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> > > In that case should lcm be "...that is an integral multiple..." since > the numeric version will return numeric? > So "integral multiple" instead of "integer multiple"? I think I'm more used to the latter, but I'm happy with either. Regards, Dean
Commits
-
Add functions gcd() and lcm() for integer and numeric types.
- 13661ddd7eae 13.0 landed