| 221 | |
| 222 | |
| 223 | void p_String0(poly p, ring lmRing, ring tailRing) |
| 224 | { |
| 225 | if (p == NULL) |
| 226 | { |
| 227 | StringAppendS("0"); |
| 228 | return; |
| 229 | } |
| 230 | p_Normalize(p,lmRing); |
| 231 | if ((n_GetChar(lmRing->cf) == 0) |
| 232 | && (nCoeff_is_transExt(lmRing->cf))) |
| 233 | p_Normalize(p,lmRing); /* Manual/absfact.tst */ |
| 234 | #ifdef HAVE_SHIFTBBA |
| 235 | if(lmRing->isLPring) |
| 236 | { |
| 237 | if ((p_GetComp(p, lmRing) == 0) || (!lmRing->VectorOut)) |
| 238 | { |
| 239 | writemonLP(p,0, lmRing); |
| 240 | p = pNext(p); |
| 241 | while (p!=NULL) |
| 242 | { |
| 243 | assume((p->coef==NULL)||(!n_IsZero(p->coef,tailRing->cf))); |
| 244 | if ((p->coef==NULL)||n_GreaterZero(p->coef,tailRing->cf)) |
| 245 | StringAppendS("+"); |
| 246 | writemonLP(p,0, tailRing); |
| 247 | p = pNext(p); |
| 248 | } |
| 249 | return; |
| 250 | } |
| 251 | } |
| 252 | else |
| 253 | #endif |
| 254 | { |
| 255 | if ((p_GetComp(p, lmRing) == 0) || (!lmRing->VectorOut)) |
| 256 | { |
| 257 | writemon(p,0, lmRing); |
| 258 | p = pNext(p); |
| 259 | while (p!=NULL) |
| 260 | { |
| 261 | assume((p->coef==NULL)||(!n_IsZero(p->coef,tailRing->cf))); |
| 262 | if ((p->coef==NULL)||n_GreaterZero(p->coef,tailRing->cf)) |
| 263 | StringAppendS("+"); |
| 264 | writemon(p,0, tailRing); |
| 265 | p = pNext(p); |
| 266 | } |
| 267 | return; |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | long k = 1; |
| 272 | StringAppendS("["); |
| 273 | #ifdef HAVE_SHIFTBBA |
| 274 | if(lmRing->isLPring) |
| 275 | { |
| 276 | loop |
| 277 | { |
| 278 | while (k < p_GetComp(p,lmRing)) |
| 279 | { |
| 280 | StringAppendS("0,"); |
no test coverage detected