Skip to content

Commit 0035a3c

Browse files
committed
chg: better debug output
1 parent bf3ad82 commit 0035a3c

3 files changed

Lines changed: 18 additions & 16 deletions

File tree

factory/facBivar.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ CFList biFactorize (const CanonicalForm& F, const Variable& v)
499499
bufUniFactors= conv (factorize (bufAeval, true));
500500
TIMING_END_AND_PRINT (fac_uni_factorizer,
501501
"time for univariate factorization: ");
502-
DEBOUTLN (cerr, "Lc (bufAeval)*prod (bufUniFactors)== bufAeval " <<
503-
(prod (bufUniFactors)*Lc (bufAeval) == bufAeval));
502+
DEBOUTLN (cerr, "prod (bufUniFactors)== bufAeval " <<
503+
(prod (bufUniFactors) == bufAeval));
504504

505505
TIMING_START (fac_uni_factorizer);
506506
if (extension)
@@ -509,8 +509,8 @@ CFList biFactorize (const CanonicalForm& F, const Variable& v)
509509
bufUniFactors2= conv (factorize (bufAeval2, true));
510510
TIMING_END_AND_PRINT (fac_uni_factorizer,
511511
"time for univariate factorization in y: ");
512-
DEBOUTLN (cerr, "Lc (Aeval2)*prod (uniFactors2)== Aeval2 " <<
513-
(prod (bufUniFactors2)*Lc (bufAeval2) == bufAeval2));
512+
DEBOUTLN (cerr, "prod (bufuniFactors2)== bufAeval2 " <<
513+
(prod (bufUniFactors2) == bufAeval2));
514514

515515
if (bufUniFactors.getFirst().inCoeffDomain())
516516
bufUniFactors.removeFirst();

factory/facFqBivar.cc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ extFactorRecombination (CFList& factors, CanonicalForm& F,
268268
}
269269

270270
DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, M) == F " <<
271-
(LC (F, 1)*prodMod (factors, M) == F));
271+
(mod (LC (F, 1)*prodMod (factors, M), M)/Lc (mod (LC (F, 1)*prodMod (factors, M), M)) == F/Lc (F)));
272272
int degMipoBeta= 1;
273273
if (!k && beta.level() != 1)
274274
degMipoBeta= degree (getMipo (beta));
@@ -463,8 +463,14 @@ factorRecombination (CFList& factors, CanonicalForm& F,
463463
F= 1;
464464
return result;
465465
}
466-
DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, N) == F " <<
467-
(LC (F, 1)*prodMod (factors, N) == F));
466+
#ifdef DEBUGOUTPUT
467+
if (b.getp() == 0)
468+
DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, N) == F " <<
469+
(mod (LC (F, 1)*prodMod (factors, N),N)/Lc (mod (LC (F, 1)*prodMod (factors, N),N)) == F/Lc(F)));
470+
else
471+
DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, N) == F " <<
472+
(mod (b(LC (F, 1)*prodMod (factors, N)),N)/Lc (mod (b(LC (F, 1)*prodMod (factors, N)),N)) == F/Lc(F)));
473+
#endif
468474
CFList T, S;
469475

470476
CanonicalForm M= N;
@@ -5816,7 +5822,7 @@ biFactorize (const CanonicalForm& F, const ExtensionInfo& info)
58165822
bufUniFactors2= uniFactorizer (bufAeval2, alpha, GF);
58175823
TIMING_END_AND_PRINT (fac_uni_factorizer,
58185824
"time for univariate factorization in y: ");
5819-
DEBOUTLN (cerr, "Lc (Aeval2)*prod (uniFactors2)== Aeval2 " <<
5825+
DEBOUTLN (cerr, "Lc (bufAeval2)*prod (bufUniFactors2)== bufAeval2 " <<
58205826
(prod (bufUniFactors2)*Lc (bufAeval2) == bufAeval2));
58215827
}
58225828

factory/facHensel.cc

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,6 @@ diophantineHensel (const CanonicalForm & F, const CFList& factors,
435435
k.getItem() += g.mapinto()*modulus;
436436
e -= mulNTL (g.mapinto()*modulus, l.getItem(), b);
437437
e= b(e);
438-
DEBOUTLN (cerr, "mod (e, power (y, i + 1))= " <<
439-
mod (e, power (y, i + 1)));
440438
}
441439
}
442440
modulus *= p;
@@ -633,8 +631,6 @@ diophantineHenselQa (const CanonicalForm & F, const CanonicalForm& G,
633631
e -= mulNTL (g.mapinto()*modulus, l.getItem(), b);
634632
}
635633
e= b(e);
636-
DEBOUTLN (cerr, "mod (e, power (y, i + 1))= " <<
637-
mod (e, power (y, i + 1)));
638634
}
639635
}
640636
modulus *= p;
@@ -1198,7 +1194,7 @@ multiRecDiophantine (const CanonicalForm& F, const CFList& factors,
11981194
j= p;
11991195
for (CFListIterator i= result; i.hasItem(); i++, j++)
12001196
test += mod (i.getItem()*j.getItem(), power (y, d));
1201-
DEBOUTLN (cerr, "test= " << test);
1197+
DEBOUTLN (cerr, "test in multiRecDiophantine= " << test);
12021198
#endif
12031199
return result;
12041200
}
@@ -1228,7 +1224,7 @@ henselStep (const CanonicalForm& F, const CFList& factors, CFArray& bufFactors,
12281224
CanonicalForm test2= mod (F-test, xToJ);
12291225

12301226
test2= mod (test2, MOD);
1231-
DEBOUTLN (cerr, "test= " << test2);
1227+
DEBOUTLN (cerr, "test in henselStep= " << test2);
12321228
#endif
12331229
}
12341230
else
@@ -1245,7 +1241,7 @@ henselStep (const CanonicalForm& F, const CFList& factors, CFArray& bufFactors,
12451241
test= mod (test, power (x, j));
12461242
test= mod (test, MOD);
12471243
CanonicalForm test2= mod (F, power (x, j - 1)) - mod (test, power (x, j-1));
1248-
DEBOUTLN (cerr, "test= " << test2);
1244+
DEBOUTLN (cerr, "test in henselStep= " << test2);
12491245
#endif
12501246

12511247
if (degree (Pi [factors.length() - 2], x) > 0)
@@ -1980,7 +1976,7 @@ nonMonicHenselStep (const CanonicalForm& F, const CFList& factors,
19801976
test= mod (test, power (x, j));
19811977
test= mod (test, MOD);
19821978
CanonicalForm test2= mod (F, power (x, j - 1)) - mod (test, power (x, j-1));
1983-
DEBOUTLN (cerr, "test= " << test2);
1979+
DEBOUTLN (cerr, "test in nonMonicHenselStep= " << test2);
19841980
#endif
19851981

19861982
if (degree (Pi [factors.length() - 2], x) > 0)

0 commit comments

Comments
 (0)