RingElem content(ConstRefRingElem f) { if (!IsPolyRing(owner(f))) CoCoA_ERROR(ERR::NotElemPolyRing, "content(f)"); const PolyRing Rx = owner(f); const ring R = CoeffRing(Rx); if (IsFractionFieldOfGCDDomain(R)) { if (IsZero(f)) return zero(R); RingElem ans(R); Rx->myContentFrF(raw(ans), raw(f)); return ans; } if (IsTrueGCDDomain(R)) { if (IsZero(f)) return zero(R); RingElem ans(R); Rx->myContent(raw(ans), raw(f)); return ans; } CoCoA_ERROR(ERR::NotTrueGCDDomain, "content(f)"); return zero(R); // never reached, just to keep compiler quiet }