Changeset 0ffdec in git
 Timestamp:
 Apr 19, 2011, 11:39:03 AM (12 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
 Children:
 f27003fd89ac86ed0bd7cc93a1342d129926c00c
 Parents:
 4f684a7f137cff04239a5a3fa6eb3dafd2cc5084
 gitauthor:
 Hans Schoenemann <hannes@mathematik.unikl.de>20110419 11:39:03+02:00
 gitcommitter:
 Mohamed Barakat <mohamed.barakat@rwthaachen.de>20111109 12:31:17+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

libpolys/polys/pDebug.cc
r4f684a r0ffdec 17 17 18 18 #include "config.h" 19 #include <misc/auxiliary.h> 19 20 #ifdef PDEBUG 20 21 … … 24 25 25 26 //#include <polys/monomials/p_polys.h> 26 #include <output.h>27 //#include <output.h> 27 28 #include <omalloc/omalloc.h> 28 29 #include <polys/monomials/ring.h> 30 #include <polys/monomials/p_polys.h> 29 31 #include <coeffs/coeffs.h> 30 32 … … 49 51 if (p != NULL) 50 52 { 51 if (r == currRing) 52 { 53 fprintf(stderr, " occured for poly: "); 54 p_wrp(p, r); 55 omPrintAddrInfo(stderr, p, " "); 56 } 57 else 58 { 59 omPrintAddrInfo(stderr, p, " occured for poly: "); 60 } 53 fprintf(stderr, " occured for poly: "); 54 p_wrp(p, r); 55 omPrintAddrInfo(stderr, p, " "); 61 56 } 62 57 dErrorBreak(); … … 90 85 #endif 91 86 { 92 pPolyAssumeReturn(omIsBinPageAddr(p) && omSizeWOfAddr(p)==r>PolyBin>sizeW,p,r);87 _pPolyAssumeReturn(omIsBinPageAddr(p) && omSizeWOfAddr(p)==r>PolyBin>sizeW,p,r); 93 88 return TRUE; 94 89 } … … 143 138 while (i); 144 139 #ifdef HAVE_RINGS 145 return n DivBy(pGetCoeff(b), pGetCoeff(a));140 return n_DivBy(pGetCoeff(b), pGetCoeff(a), r>cf); 146 141 #else 147 142 return TRUE; … … 213 208 #ifndef OM_NDEBUG 214 209 // check addr with level+1 so as to check bin/page of addr 215 pPolyAssumeReturnMsg(omTestBinAddrSize(p, (r>PolyBin>sizeW)*SIZEOF_LONG, level+1)210 _pPolyAssumeReturnMsg(omTestBinAddrSize(p, (r>PolyBin>sizeW)*SIZEOF_LONG, level+1) 216 211 == omError_NoError, "memory error",p,r); 217 212 #endif … … 233 228 #ifndef OM_NDEBUG 234 229 // omAddr check 235 pPolyAssumeReturnMsg(omTestBinAddrSize(p, (r>PolyBin>sizeW)*SIZEOF_LONG, 1)230 _pPolyAssumeReturnMsg(omTestBinAddrSize(p, (r>PolyBin>sizeW)*SIZEOF_LONG, 1) 236 231 == omError_NoError, "memory error",p,r); 237 232 #endif 238 233 // number/coef check 239 pPolyAssumeReturnMsg(p>coef != NULL  (n_GetChar(r) >= 2), "NULL coef",p,r);234 _pPolyAssumeReturnMsg(p>coef != NULL  (n_GetChar(r>cf) >= 2), "NULL coef",p,r); 240 235 #ifdef LDEBUG 241 r>cf> nDBTest(p>coef,__FILE__,__LINE__);236 r>cf>cfDBTest(p>coef,__FILE__,__LINE__,r>cf); 242 237 #endif 243 pPolyAssumeReturnMsg(!n_IsZero(p>coef, r), "Zero coef",p,r);238 _pPolyAssumeReturnMsg(!n_IsZero(p>coef, r>cf), "Zero coef",p,r); 244 239 245 240 // check for valid comp 246 pPolyAssumeReturnMsg(p_GetComp(p, r) >= 0 && (p_GetComp(p, r)<65000), "component out of range ?",p,r);241 _pPolyAssumeReturnMsg(p_GetComp(p, r) >= 0 && (p_GetComp(p, r)<65000), "component out of range ?",p,r); 247 242 // check for mix poly/vec representation 248 pPolyAssumeReturnMsg(ismod == (p_GetComp(p, r) != 0), "mixed poly/vector",p,r);243 _pPolyAssumeReturnMsg(ismod == (p_GetComp(p, r) != 0), "mixed poly/vector",p,r); 249 244 250 245 // special check for ringorder_s/S … … 261 256 } 262 257 else { cc1=0; ccc1=0; } 263 pPolyAssumeReturnMsg(c1 == 0  cc1 != 0, "Component <> TrueComponent zero mismatch",p,r);264 pPolyAssumeReturnMsg(c1 == 0  ccc1 != 0,"Component <> ShiftedComponent zero mismatch",p,r);258 _pPolyAssumeReturnMsg(c1 == 0  cc1 != 0, "Component <> TrueComponent zero mismatch",p,r); 259 _pPolyAssumeReturnMsg(c1 == 0  ccc1 != 0,"Component <> ShiftedComponent zero mismatch",p,r); 265 260 ec1 = p>exp[o>data.syzcomp.place]; 266 261 //pPolyAssumeReturnMsg(ec1 == ccc1, "Shifted comp out of sync. should %d, is %d"); … … 276 271 { 277 272 poly p_should_equal = p_DebugInit(p, r, r); 278 pPolyAssumeReturnMsg(p_ExpVectorEqual(p, p_should_equal, r), "p_Setm field(s) out of sync",p,r);273 _pPolyAssumeReturnMsg(p_ExpVectorEqual(p, p_should_equal, r), "p_Setm field(s) out of sync",p,r); 279 274 p_LmFree(p_should_equal, r); 280 275 } … … 286 281 if (cmp == 0) 287 282 { 288 pPolyAssumeReturnMsg(0, "monoms p and p>next are equal", p_prev, r);283 _pPolyAssumeReturnMsg(0, "monoms p and p>next are equal", p_prev, r); 289 284 } 290 285 else 291 pPolyAssumeReturnMsg(p_LmCmp(p_prev, p, r) == 1, "wrong order", p_prev, r);286 _pPolyAssumeReturnMsg(p_LmCmp(p_prev, p, r) == 1, "wrong order", p_prev, r); 292 287 293 288 // check that compare worked sensibly … … 299 294 if (p_GetExp(p_prev, i, r) != p_GetExp(p, i, r)) break; 300 295 } 301 pPolyAssumeReturnMsg(i > 0, "Exponents equal but compare different", p_prev, r);296 _pPolyAssumeReturnMsg(i > 0, "Exponents equal but compare different", p_prev, r); 302 297 } 303 298 } … … 353 348 poly p2, unsigned long not_sev_2, ring r_2) 354 349 { 355 pPolyAssume(p_GetShortExpVector(p1, r_1) == sev_1, p1, r_1);356 pPolyAssume(p_GetShortExpVector(p2, r_2) == ~ not_sev_2, p2, r_2);350 _pPolyAssume(p_GetShortExpVector(p1, r_1) == sev_1, p1, r_1); 351 _pPolyAssume(p_GetShortExpVector(p2, r_2) == ~ not_sev_2, p2, r_2); 357 352 358 353 pDivisibleBy_number++;
Note: See TracChangeset
for help on using the changeset viewer.