up previous next
den

denominator

Syntax
den(X: INT|RAT): INT
den(X: RINGELEM): RINGELEM

Description
These function returns the denominator of the argument X . If X is a RINGELEM in FractionField(R) , then den(X) is a RingElem in R .

NOTE: In CoCoA 4 the numerator and denominator could also be found using the suffixes .Num and .Den ; this fragile syntax is now obsolete.

Example
/**/  den(3);
1

/**/  P ::= QQ[x,y];
/**/  F := NewFractionField(P);
/**/  use F;
/**/  den(x/(x+y));
x +y
/**/  RingOf(It);
RingWithID(4, "QQ[x,y]")

See Also