Macaulay2 » Documentation
Packages » Macaulay2Doc » elementary arithmetic » gcd
next | previous | forward | backward | up | index | toc

gcd -- greatest common divisor

Description

i1 : gcd(12,8,48)

o1 = 4
i2 : R = QQ[x,y,z];
i3 : gcd(x^2*y,x*y^3^6)

o3 = x*y

o3 : R
i4 : gcd(x^36-1,x^24-1)

      12
o4 = x   - 1

o4 : R

See also

Ways to use gcd:

  • gcd()
  • gcd(List)
  • gcd(QQ)
  • gcd(QQ,QQ)
  • gcd(QQ,ZZ)
  • gcd(RingElement)
  • gcd(RingElement,RingElement)
  • gcd(RingElement,ZZ)
  • gcd(Sequence)
  • gcd(ZZ)
  • gcd(ZZ,QQ)
  • gcd(ZZ,RingElement)
  • gcd(ZZ,ZZ)

For the programmer

The object gcd is an associative binary method function.


The source of this document is in Macaulay2Doc/operators.m2:139:0.