File tree Expand file tree Collapse file tree 1 file changed +18
-11
lines changed
Expand file tree Collapse file tree 1 file changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,12 @@ CanonicalForm evalPoint (const CanonicalForm& F, int& i)
171171 else
172172 {
173173 if (testPoint (F, result, -i))
174+ {
175+ i= -i;
174176 return result;
177+ }
178+ else if (i < 0 )
179+ i= -i;
175180 }
176181 k++;
177182 }
@@ -486,7 +491,6 @@ CFList biFactorize (const CanonicalForm& F, const Variable& v)
486491 bufAeval2= buf;
487492 bufAeval2= evalPoint (buf, bufEvaluation2);
488493
489-
490494 // univariate factorization
491495 TIMING_START (fac_uni_factorizer);
492496
@@ -591,21 +595,24 @@ CFList biFactorize (const CanonicalForm& F, const Variable& v)
591595 }
592596 if (bufUniFactors.length () < uniFactors.length ())
593597 {
594- if (evaluation != 0 )
595- {
596- uniFactors= bufUniFactors;
597- Aeval= bufAeval;
598- evaluation= bufEvaluation;
599- }
598+ uniFactors= bufUniFactors;
599+ Aeval= bufAeval;
600+ evaluation= bufEvaluation;
600601 }
601602 }
602- bufEvaluation++;
603- bufEvaluation2++;
603+ if (bufEvaluation > 0 )
604+ bufEvaluation++;
605+ else
606+ bufEvaluation= -bufEvaluation + 1 ;
607+ if (bufEvaluation > 0 )
608+ bufEvaluation2++;
609+ else
610+ bufEvaluation2= -bufEvaluation2 + 1 ;
604611 }
605612
606- if (evaluation != 0 && ( uniFactors.length () > uniFactors2.length () ||
613+ if (uniFactors.length () > uniFactors2.length () ||
607614 (uniFactors.length () == uniFactors2.length ()
608- && degs.getLength () > degs2.getLength ())))
615+ && degs.getLength () > degs2.getLength ()))
609616 {
610617 degs= degs2;
611618 uniFactors= uniFactors2;
You can’t perform that action at this time.
0 commit comments