| 211 | } |
| 212 | |
| 213 | int kFindDivisibleByInT_Z(const kStrategy strat, const LObject* L, const int start) |
| 214 | { |
| 215 | unsigned long not_sev = ~L->sev; |
| 216 | int j = start; |
| 217 | int o = -1; |
| 218 | |
| 219 | const TSet T=strat->T; |
| 220 | const unsigned long* sevT=strat->sevT; |
| 221 | number rest, orest, mult; |
| 222 | if (L->p!=NULL) |
| 223 | { |
| 224 | const ring r=currRing; |
| 225 | const poly p=L->p; |
| 226 | orest = pGetCoeff(p); |
| 227 | |
| 228 | pAssume(~not_sev == p_GetShortExpVector(p, r)); |
| 229 | |
| 230 | loop |
| 231 | { |
| 232 | if (j > strat->tl) return o; |
| 233 | #if defined(PDEBUG) || defined(PDIV_DEBUG) |
| 234 | if (p_LmShortDivisibleBy(T[j].p, sevT[j],p, not_sev, r)) |
| 235 | #else |
| 236 | if (!(sevT[j] & not_sev) && p_LmDivisibleBy(T[j].p, p, r)) |
| 237 | #endif |
| 238 | { |
| 239 | mult= n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].p), &rest, r->cf); |
| 240 | if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf)) |
| 241 | { |
| 242 | o = j; |
| 243 | orest = rest; |
| 244 | } |
| 245 | } |
| 246 | j++; |
| 247 | } |
| 248 | } |
| 249 | else |
| 250 | { |
| 251 | const ring r=strat->tailRing; |
no test coverage detected