Add functions gcd() and lcm() for integer and numeric types.

Dean Rasheed <dean.a.rasheed@gmail.com>

Commit: 13661ddd7eaec7e2809ff5c29fc14653b6161036
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
Date: 2020-01-25T14:00:59Z
Releases: 13.0
Add functions gcd() and lcm() for integer and numeric types.

These compute the greatest common divisor and least common multiple of
a pair of numbers using the Euclidean algorithm.

Vik Fearing, reviewed by Fabien Coelho.

Discussion: https://postgr.es/m/adbd3e0b-e3f1-5bbc-21db-03caf1cef0f7@2ndquadrant.com

Files

Documentation touched

Discussion