| 2274 | } |
| 2275 | |
| 2276 | CanonicalForm |
| 2277 | mulMod2FLINTQ (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 |
| 2305 | mulMod2FLINTQa (const CanonicalForm& F, const CanonicalForm& G, |
no test coverage detected