[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323
Bernhard R. Link
brlink at debian.org
Tue Apr 24 15:52:56 UTC 2012
The following commit has been merged in the cleanedupstream branch:
commit c03e60bd3722f3c7f17e11d709a92a17a8772f4b
Author: Martin Lee <martinlee84 at web.de>
Date: Wed Feb 1 10:54:42 2012 +0100
chg: deleted unnecessary divisibility test
diff --git a/factory/facFqBivar.cc b/factory/facFqBivar.cc
index 96bae26..ac01415 100644
--- a/factory/facFqBivar.cc
+++ b/factory/facFqBivar.cc
@@ -324,72 +324,66 @@ extFactorRecombination (CFList& factors, CanonicalForm& F,
continue;
else
{
- g= prodMod0 (S, M);
- g= mod (g*LCBuf, M);
- g /= content (g);
- if (fdivides (LC (g), LCBuf))
+ S.insert (LCBuf);
+ g= prodMod (S, M);
+ S.removeFirst();
+ g /= content (g, x);
+ if (fdivides (g, buf, quot))
{
- S.insert (LCBuf);
- g= prodMod (S, M);
- S.removeFirst();
- g /= content (g, x);
- if (fdivides (g, buf, quot))
- {
- buf2= g (y - eval, y);
- buf2 /= Lc (buf2);
+ buf2= g (y - eval, y);
+ buf2 /= Lc (buf2);
- if (!k && beta.level() == 1)
+ if (!k && beta.level() == 1)
+ {
+ if (degree (buf2, alpha) < degMipoBeta)
{
- if (degree (buf2, alpha) < degMipoBeta)
- {
- buf= quot;
- LCBuf= LC (buf, x);
- recombination= true;
- appendTestMapDown (result, buf2, info, source, dest);
- trueFactor= true;
- }
+ buf= quot;
+ LCBuf= LC (buf, x);
+ recombination= true;
+ appendTestMapDown (result, buf2, info, source, dest);
+ trueFactor= true;
}
- else
+ }
+ else
+ {
+ if (!isInExtension (buf2, gamma, k, delta, source, dest))
{
- if (!isInExtension (buf2, gamma, k, delta, source, dest))
- {
- buf= quot;
- LCBuf= LC (buf, x);
- recombination= true;
- appendTestMapDown (result, buf2, info, source, dest);
- trueFactor= true;
- }
+ buf= quot;
+ LCBuf= LC (buf, x);
+ recombination= true;
+ appendTestMapDown (result, buf2, info, source, dest);
+ trueFactor= true;
}
- if (trueFactor)
+ }
+ if (trueFactor)
+ {
+ T= Difference (T, S);
+ // compute new possible degree pattern
+ bufDegs2= DegreePattern (T);
+ bufDegs1.intersect (bufDegs2);
+ bufDegs1.refine ();
+ if (T.length() < 2*s || T.length() == s ||
+ bufDegs1.getLength() == 1)
{
- T= Difference (T, S);
- // compute new possible degree pattern
- bufDegs2= DegreePattern (T);
- bufDegs1.intersect (bufDegs2);
- bufDegs1.refine ();
- if (T.length() < 2*s || T.length() == s ||
- bufDegs1.getLength() == 1)
+ delete [] v;
+ if (recombination)
+ {
+ appendTestMapDown (result, buf (y - eval, y), info, source,
+ dest);
+ F= 1;
+ return result;
+ }
+ else
{
- delete [] v;
- if (recombination)
- {
- appendTestMapDown (result, buf (y - eval, y), info, source,
- dest);
- F= 1;
- return result;
- }
- else
- {
- appendMapDown (result, F (y - eval, y), info, source, dest);
- F= 1;
- return result;
- }
+ appendMapDown (result, F (y - eval, y), info, source, dest);
+ F= 1;
+ return result;
}
- trueFactor= false;
- TT= copy (T);
- indexUpdate (v, s, T.length(), nosubset);
- if (nosubset) break;
}
+ trueFactor= false;
+ TT= copy (T);
+ indexUpdate (v, s, T.length(), nosubset);
+ if (nosubset) break;
}
}
}
@@ -504,49 +498,43 @@ factorRecombination (CFList& factors, CanonicalForm& F,
continue;
else
{
- g= prodMod0 (S, M);
- g= mod (g*LCBuf, M);
- g /= content (g);
- if (fdivides (LC(g), LCBuf))
+ S.insert (LCBuf);
+ g= prodMod (S, M);
+ S.removeFirst();
+ g /= content (g, x);
+
+ if (fdivides (g, buf, quot))
{
- S.insert (LCBuf);
- g= prodMod (S, M);
- S.removeFirst();
- g /= content (g, x);
+ recombination= true;
+ result.append (g);
+ buf= quot;
+ LCBuf= LC (buf, x);
+ T= Difference (T, S);
- if (fdivides (g, buf, quot))
+ // compute new possible degree pattern
+ bufDegs2= DegreePattern (T);
+ bufDegs1.intersect (bufDegs2);
+ bufDegs1.refine ();
+ if (T.length() < 2*s || T.length() == s ||
+ bufDegs1.getLength() == 1)
{
- recombination= true;
- result.append (g);
- buf= quot;
- LCBuf= LC (buf, x);
- T= Difference (T, S);
-
- // compute new possible degree pattern
- bufDegs2= DegreePattern (T);
- bufDegs1.intersect (bufDegs2);
- bufDegs1.refine ();
- if (T.length() < 2*s || T.length() == s ||
- bufDegs1.getLength() == 1)
+ delete [] v;
+ if (recombination)
{
- delete [] v;
- if (recombination)
- {
- result.append (buf);
- F= 1;
- return result;
- }
- else
- {
- result= CFList (F);
- F= 1;
- return result;
- }
+ result.append (buf);
+ F= 1;
+ return result;
+ }
+ else
+ {
+ result= CFList (F);
+ F= 1;
+ return result;
}
- TT= copy (T);
- indexUpdate (v, s, T.length(), nosubset);
- if (nosubset) break;
}
+ TT= copy (T);
+ indexUpdate (v, s, T.length(), nosubset);
+ if (nosubset) break;
}
}
}
@@ -641,30 +629,24 @@ earlyFactorDetection (CanonicalForm& F, CFList& factors,int& adaptedLiftBound,
continue;
else
{
- g= i.getItem() (0, 1);
- g *= LCBuf;
- g= mod (g, M);
- if (fdivides (LC (g), LCBuf))
- {
- g= mulMod2 (i.getItem(), LCBuf, M);
- g /= content (g, x);
- if (fdivides (g, buf, quot))
+ g= mulMod2 (i.getItem(), LCBuf, M);
+ g /= content (g, x);
+ if (fdivides (g, buf, quot))
+ {
+ result.append (g);
+ buf= quot;
+ d -= degree (g);
+ LCBuf= LC (buf, x);
+ T= Difference (T, CFList (i.getItem()));
+
+ // compute new possible degree pattern
+ bufDegs2= DegreePattern (T);
+ bufDegs1.intersect (bufDegs2);
+ bufDegs1.refine ();
+ if (bufDegs1.getLength() <= 1)
{
- result.append (g);
- buf= quot;
- d -= degree (g);
- LCBuf= LC (buf, x);
- T= Difference (T, CFList (i.getItem()));
-
- // compute new possible degree pattern
- bufDegs2= DegreePattern (T);
- bufDegs1.intersect (bufDegs2);
- bufDegs1.refine ();
- if (bufDegs1.getLength() <= 1)
- {
- result.append (buf);
- break;
- }
+ result.append (buf);
+ break;
}
}
}
@@ -714,56 +696,50 @@ extEarlyFactorDetection (CanonicalForm& F, CFList& factors,
continue;
else
{
- g= i.getItem() (0, 1);
- g *= LCBuf;
- g= mod (g, M);
- if (fdivides (LC (g), LCBuf))
+ g= mulMod2 (i.getItem(), LCBuf, M);
+ g /= content (g, x);
+ if (fdivides (g, buf, quot))
{
- g= mulMod2 (i.getItem(), LCBuf, M);
- g /= content (g, x);
- if (fdivides (g, buf, quot))
- {
- buf2= g (y - eval, y);
- buf2 /= Lc (buf2);
+ buf2= g (y - eval, y);
+ buf2 /= Lc (buf2);
- if (!k && beta == x)
+ if (!k && beta == x)
+ {
+ if (degree (buf2, alpha) < degMipoBeta)
{
- if (degree (buf2, alpha) < degMipoBeta)
- {
- appendTestMapDown (result, buf2, info, source, dest);
- buf= quot;
- d -= degree (g);
- LCBuf= LC (buf, x);
- trueFactor= true;
- }
+ appendTestMapDown (result, buf2, info, source, dest);
+ buf= quot;
+ d -= degree (g);
+ LCBuf= LC (buf, x);
+ trueFactor= true;
}
- else
+ }
+ else
+ {
+ if (!isInExtension (buf2, gamma, k, delta, source, dest))
{
- if (!isInExtension (buf2, gamma, k, delta, source, dest))
- {
- appendTestMapDown (result, buf2, info, source, dest);
- buf= quot;
- d -= degree (g);
- LCBuf= LC (buf, x);
- trueFactor= true;
- }
+ appendTestMapDown (result, buf2, info, source, dest);
+ buf= quot;
+ d -= degree (g);
+ LCBuf= LC (buf, x);
+ trueFactor= true;
}
- if (trueFactor)
- {
- T= Difference (T, CFList (i.getItem()));
+ }
+ if (trueFactor)
+ {
+ T= Difference (T, CFList (i.getItem()));
- // compute new possible degree pattern
- bufDegs2= DegreePattern (T);
- bufDegs1.intersect (bufDegs2);
- bufDegs1.refine ();
- trueFactor= false;
- if (bufDegs1.getLength() <= 1)
- {
- buf= buf (y - eval, y);
- buf /= Lc (buf);
- appendMapDown (result, buf, info, source, dest);
- break;
- }
+ // compute new possible degree pattern
+ bufDegs2= DegreePattern (T);
+ bufDegs1.intersect (bufDegs2);
+ bufDegs1.refine ();
+ trueFactor= false;
+ if (bufDegs1.getLength() <= 1)
+ {
+ buf= buf (y - eval, y);
+ buf /= Lc (buf);
+ appendMapDown (result, buf, info, source, dest);
+ break;
}
}
}
--
an open source computer algebra system
More information about the debian-science-commits
mailing list