next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: denominator

denominator -- denominator of a fraction

Synopsis

Description

i1 : denominator (4/6)

o1 = 3

i2 : R = frac(ZZ[x,y]);
i3 : denominator((x+2*y-3)/(x-y))

o3 = x - y

o3 : ZZ[x, y]

denominator also works with Hilbert series.

i4 : R = QQ[a..d]/(a^2,b^2,c^3);
i5 : hf = hilbertSeries R

           2    3    4     5    7
     1 - 2T  - T  + T  + 2T  - T
o5 = ----------------------------
                      4
               (1 - T)

o5 : Expression of class Divide
i6 : denominator hf

            4
o6 = (1 - T)

o6 : Expression of class Product

For a Laurent polynomial in a ring with inverses of variables, it gives the monomial needed to clear all the denominators in each of the terms.

i7 : R = QQ[x,y,z,Inverses => true, MonomialOrder => Lex]

o7 = R

o7 : PolynomialRing
i8 : denominator (x*y^-1+y*z^-2+1+y^-1*z^-1)

        2
o8 = y*z

o8 : R

See also

Ways to use denominator :