Greatest common divisor and least common multiple
vectors of integers.
Computation based on the extended Euclidean algorithm.
b are vectors of the same length, the greatest
common divisor/lowest common multiple will be computed elementwise.
If one is a vektor, the other a scalar, the scalar will be replicated to
the same length.
A numeric (integer) value or vector of integers. Or a list of three vectors
c, d, g, g containing the greatest common divisors, such that
g = c * a + d * b.
The following relation is always true:
n * m = gcd(n, m) * lcm(n, m)
1 2 3 4
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.