Skip to content

Commit

Permalink
chg: better debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
mmklee committed Apr 4, 2012
1 parent 57daf87 commit 27ab369
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
8 changes: 4 additions & 4 deletions factory/facBivar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,8 @@ CFList biFactorize (const CanonicalForm& F, const Variable& v)
bufUniFactors= conv (factorize (bufAeval, true));
TIMING_END_AND_PRINT (uni_factorize,
"time for univariate factorization: ");
DEBOUTLN (cerr, "Lc (bufAeval)*prod (bufUniFactors)== bufAeval " <<
(prod (bufUniFactors)*Lc (bufAeval) == bufAeval));
DEBOUTLN (cerr, "prod (bufUniFactors)== bufAeval " <<
(prod (bufUniFactors) == bufAeval));

TIMING_START (uni_factorize);
if (extension)
Expand All @@ -511,8 +511,8 @@ CFList biFactorize (const CanonicalForm& F, const Variable& v)
bufUniFactors2= conv (factorize (bufAeval2, true));
TIMING_END_AND_PRINT (uni_factorize,
"time for univariate factorization in y: ");
DEBOUTLN (cerr, "Lc (Aeval2)*prod (uniFactors2)== Aeval2 " <<
(prod (bufUniFactors2)*Lc (bufAeval2) == bufAeval2));
DEBOUTLN (cerr, "prod (bufuniFactors2)== bufAeval2 " <<
(prod (bufUniFactors2) == bufAeval2));

if (bufUniFactors.getFirst().inCoeffDomain())
bufUniFactors.removeFirst();
Expand Down
14 changes: 10 additions & 4 deletions factory/facFqBivar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ extFactorRecombination (CFList& factors, CanonicalForm& F,
}

DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, M) == F " <<
(LC (F, 1)*prodMod (factors, M) == F));
(mod (LC (F, 1)*prodMod (factors, M), M)/Lc (mod (LC (F, 1)*prodMod (factors, M), M)) == F/Lc (F)));
int degMipoBeta= 1;
if (!k && beta.level() != 1)
degMipoBeta= degree (getMipo (beta));
Expand Down Expand Up @@ -464,8 +464,14 @@ factorRecombination (CFList& factors, CanonicalForm& F,
F= 1;
return result;
}
DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, N) == F " <<
(LC (F, 1)*prodMod (factors, N) == F));
#ifdef DEBUGOUTPUT
if (b.getp() == 0)
DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, N) == F " <<
(mod (LC (F, 1)*prodMod (factors, N),N)/Lc (mod (LC (F, 1)*prodMod (factors, N),N)) == F/Lc(F)));
else
DEBOUTLN (cerr, "LC (F, 1)*prodMod (factors, N) == F " <<
(mod (b(LC (F, 1)*prodMod (factors, N)),N)/Lc (mod (b(LC (F, 1)*prodMod (factors, N)),N)) == F/Lc(F)));
#endif
CFList T, S;

CanonicalForm M= N;
Expand Down Expand Up @@ -5817,7 +5823,7 @@ biFactorize (const CanonicalForm& F, const ExtensionInfo& info)
bufUniFactors2= uniFactorizer (bufAeval2, alpha, GF);
TIMING_END_AND_PRINT (fac_uni_factorizer,
"time for univariate factorization in y: ");
DEBOUTLN (cerr, "Lc (Aeval2)*prod (uniFactors2)== Aeval2 " <<
DEBOUTLN (cerr, "Lc (bufAeval2)*prod (bufUniFactors2)== bufAeval2 " <<
(prod (bufUniFactors2)*Lc (bufAeval2) == bufAeval2));
}

Expand Down
12 changes: 4 additions & 8 deletions factory/facHensel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,6 @@ diophantineHensel (const CanonicalForm & F, const CFList& factors,
k.getItem() += g.mapinto()*modulus;
e -= mulNTL (g.mapinto()*modulus, l.getItem(), b);
e= b(e);
DEBOUTLN (cerr, "mod (e, power (y, i + 1))= " <<
mod (e, power (y, i + 1)));
}
}
modulus *= p;
Expand Down Expand Up @@ -637,8 +635,6 @@ diophantineHenselQa (const CanonicalForm & F, const CanonicalForm& G,
e -= mulNTL (g.mapinto()*modulus, l.getItem(), b);
}
e= b(e);
DEBOUTLN (cerr, "mod (e, power (y, i + 1))= " <<
mod (e, power (y, i + 1)));
}
}
modulus *= p;
Expand Down Expand Up @@ -1202,7 +1198,7 @@ multiRecDiophantine (const CanonicalForm& F, const CFList& factors,
j= p;
for (CFListIterator i= result; i.hasItem(); i++, j++)
test += mod (i.getItem()*j.getItem(), power (y, d));
DEBOUTLN (cerr, "test= " << test);
DEBOUTLN (cerr, "test in multiRecDiophantine= " << test);
#endif
return result;
}
Expand Down Expand Up @@ -1232,7 +1228,7 @@ henselStep (const CanonicalForm& F, const CFList& factors, CFArray& bufFactors,
CanonicalForm test2= mod (F-test, xToJ);

test2= mod (test2, MOD);
DEBOUTLN (cerr, "test= " << test2);
DEBOUTLN (cerr, "test in henselStep= " << test2);
#endif
}
else
Expand All @@ -1249,7 +1245,7 @@ henselStep (const CanonicalForm& F, const CFList& factors, CFArray& bufFactors,
test= mod (test, power (x, j));
test= mod (test, MOD);
CanonicalForm test2= mod (F, power (x, j - 1)) - mod (test, power (x, j-1));
DEBOUTLN (cerr, "test= " << test2);
DEBOUTLN (cerr, "test in henselStep= " << test2);
#endif

if (degree (Pi [factors.length() - 2], x) > 0)
Expand Down Expand Up @@ -1984,7 +1980,7 @@ nonMonicHenselStep (const CanonicalForm& F, const CFList& factors,
test= mod (test, power (x, j));
test= mod (test, MOD);
CanonicalForm test2= mod (F, power (x, j - 1)) - mod (test, power (x, j-1));
DEBOUTLN (cerr, "test= " << test2);
DEBOUTLN (cerr, "test in nonMonicHenselStep= " << test2);
#endif

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

0 comments on commit 27ab369

Please sign in to comment.