| 3183 | } |
| 3184 | |
| 3185 | CanonicalForm prodMod (const CFList& L, const CanonicalForm& M) |
| 3186 | { |
| 3187 | if (L.isEmpty()) |
| 3188 | return 1; |
| 3189 | int l= L.length(); |
| 3190 | if (l == 1) |
| 3191 | return mod (L.getFirst(), M); |
| 3192 | else if (l == 2) { |
| 3193 | CanonicalForm result= mulMod2 (L.getFirst(), L.getLast(), M); |
| 3194 | return result; |
| 3195 | } |
| 3196 | else |
| 3197 | { |
| 3198 | l /= 2; |
| 3199 | CFList tmp1, tmp2; |
| 3200 | CFListIterator i= L; |
| 3201 | CanonicalForm buf1, buf2; |
| 3202 | for (int j= 1; j <= l; j++, i++) |
| 3203 | tmp1.append (i.getItem()); |
| 3204 | tmp2= Difference (L, tmp1); |
| 3205 | buf1= prodMod (tmp1, M); |
| 3206 | buf2= prodMod (tmp2, M); |
| 3207 | CanonicalForm result= mulMod2 (buf1, buf2, M); |
| 3208 | return result; |
| 3209 | } |
| 3210 | } |
| 3211 | |
| 3212 | CanonicalForm prodMod (const CFList& L, const CFList& M) |
| 3213 | { |
no test coverage detected