2 gcdrem - result of removing factors of integer common to a specified integer
11 return non-negative integer
15 If x and y are not zero, gcdrem(x, y) returns the greatest integer
16 divisor d of x relatively prime to y, i.e. for which gcd(d,y) = 1.
17 In particular, gcdrem(x,y) = abs(x) if x and y are relatively
20 For all x, gcdrem(x, 0) = 1.
22 For all nonzero y, gcdrem(0, y) = 0.
25 gcdrem(x,y) = gcd(abs(x), abs(y)).
27 If x is not zero, gcdrem(x,y) = gcdrem(x, gcd(x,y)) = gcdrem(x, y % x).
29 For fixed nonzero x, gcdrem(x,y) is periodic with period abs(x).
31 gcdrem(x,y) = 1 if and only if every prime divisor of x
34 If x is not zero, gcdrem(x,y) == abs(x) if and only if gcd(x,y) = 1.
36 If y is not zero and p_1, p_2, ..., p_k are the prime divisors of y,
38 gcdrem(x,y) = frem(...(frem(frem(x,p_1),p_2)...,p_k)
41 > print gcdrem(6,15), gcdrem(15,6), gcdrem(72,6), gcdrem(6,72)
44 > print gcdrem(630,6), gcdrem(6,630)
51 NUMBER *qgcdrem(NUMBER *x, NUMBER *y)