MCPcopy Create free account
hub / github.com/Singular/Singular / mulMod2FLINTQ

Function mulMod2FLINTQ

factory/facMul.cc:2276–2302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2274}
2275
2276CanonicalForm
2277mulMod2FLINTQ (const CanonicalForm& F, const CanonicalForm& G, const
2278 CanonicalForm& M)
2279{
2280 CanonicalForm A= F;
2281 CanonicalForm B= G;
2282
2283 int degAx= degree (A, 1);
2284 int degBx= degree (B, 1);
2285 int d1= degAx + 1 + degBx;
2286
2287 CanonicalForm f= bCommonDen (F);
2288 CanonicalForm g= bCommonDen (G);
2289 A *= f;
2290 B *= g;
2291
2292 fmpz_poly_t FLINTA, FLINTB;
2293 kronSubQa (FLINTA, A, d1);
2294 kronSubQa (FLINTB, B, d1);
2295 int k= d1*degree (M);
2296
2297 fmpz_poly_mullow (FLINTA, FLINTA, FLINTB, (long) k);
2298 A= reverseSubstQ (FLINTA, d1);
2299 fmpz_poly_clear (FLINTA);
2300 fmpz_poly_clear (FLINTB);
2301 return A/(f*g);
2302}
2303
2304/*CanonicalForm
2305mulMod2FLINTQa (const CanonicalForm& F, const CanonicalForm& G,

Callers 1

mulMod2FLINTQaFunction · 0.85

Calls 4

degreeFunction · 0.85
bCommonDenFunction · 0.85
kronSubQaFunction · 0.85
reverseSubstQFunction · 0.85

Tested by

no test coverage detected