RingElem deriv(ConstRefRingElem f, ConstRefRingElem x) { if (owner(x) != owner(f)) CoCoA_ERROR(ERR::MixedRings, "deriv(f, x)"); if (IsFractionField(owner(f))) return DerivFrF(f,x); // From here on we are in the "polynomial" case. if (!IsIndet(x)) CoCoA_ERROR(ERR::NotIndet, "deriv(f,x)"); const PolyRing Rx = owner(f); RingElem ans(Rx); Rx->myDeriv(raw(ans), raw(f), raw(x)); return ans; }