[Next] [Prev] [Right] [Left] [Up] [Index] [Root]
Common Divisors and Common Multiples
Common Divisors and Common Multiples
GreatestCommonDivisor(m, n) : RngIntElt, RngIntElt -> RngIntElt
Gcd(m, n) : RngIntElt, RngIntElt -> RngIntElt
GCD(m, n) : RngIntElt, RngIntElt -> RngIntElt
The positive integer that is the largest integer
dividing both m and n. If m is
zero and n is non-zero, this returns n, and vice versa.
If m and n are both zero the result is zero.
GreatestCommonDivisor(s) : [RngIntElt] -> RngIntElt
Gcd(s) : [RngIntElt] -> RngIntElt
GCD(s) : [RngIntElt] -> RngIntElt
The positive integer that is the largest integer
dividing each of the integers in the sequence s.
If all entries of the sequence are zero, the result is zero.
An error results if the sequence is empty.
ExtendedGreatestCommonDivisor(m, n) : RngIntElt, RngIntElt -> RngIntElt, RngIntElt, RngIntElt
Xgcd(m, n) : RngIntElt, RngIntElt -> RngIntElt, RngIntElt, RngIntElt
XGCD(m, n) : RngIntElt, RngIntElt -> RngIntElt, RngIntElt, RngIntElt
The extended gcd; returns integers g, x and y such that g
is the greatest common divisor of the integers m and n, and
g = x.m + y.n.
ExtendedGreatestCommonDivisor(s) : [RngIntElt] -> RngIntElt, [RngIntElt]
Xgcd(s) : [RngIntElt] -> RngIntElt, [RngIntElt]
XGCD(s) : [RngIntElt] -> RngIntElt, [RngIntElt]
Given a sequence of integers s = [s_1, ..., s_r], return an
integer g and a sequence X=(x_1, ..., x_r) such that g
is the greatest common divisor of the integers s_i and
g is the sum over i of x_i.s_i.
LeastCommonMultiple(m, n) : RngIntElt, RngIntElt -> RngIntElt
Lcm(m, n) : RngIntElt, RngIntElt -> RngIntElt
LCM(m, n) : RngIntElt, RngIntElt -> RngIntElt
The smallest non-negative integer divisible by both m and n.
If m or n equals zero, the result is zero; this ensures
that lcm(m, n)gcd(m, n) = m.n.
LeastCommonMultiple(s) : [RngIntElt] -> RngIntElt
Lcm(s) : [RngIntElt] -> RngIntElt
LCM(s) : [RngIntElt] -> RngIntElt
Least common multiple of the sequence of integers s.
[Next] [Prev] [Right] [Left] [Up] [Index] [Root]