Skip to content

Commit ea1d44c

Browse files
committed
chg: count factors only in debug version
1 parent 67ed745 commit ea1d44c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

libpolys/polys/clapsing.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,28 +792,39 @@ ideal singclap_factorize ( poly f, intvec ** v , int with_exps, const ring r)
792792
#endif
793793
else if (rField_is_Extension(r)) /* Q(a), Fp(a) */
794794
{
795+
#ifndef NDEBUG
795796
intvec *w=NULL;
796797
if (v!=NULL) w=*v;
798+
#endif
797799
if (r->cf->extRing->qideal==NULL)
798800
{
801+
#ifdef NDEBUG
802+
res->m[j]= convFactoryPSingTrP( J.getItem().factor(),r );
803+
#else
799804
if(!count_Factors(res,w,j,ff,convFactoryPSingTrP( J.getItem().factor(),r ),r))
800805
{
801806
if (w!=NULL)
802807
(*w)[j]=1;
803808
res->m[j]=p_One(r);
804809
}
810+
#endif
805811
}
806812
else
807813
{
814+
#ifdef NDEBUG
815+
res->m[j]= convFactoryAPSingAP( J.getItem().factor(),r );
816+
#else
808817
if (!count_Factors(res,w,j,ff,convFactoryAPSingAP( J.getItem().factor(),r ),r))
809818
{
810819
if (w!=NULL)
811820
(*w)[j]=1;
812821
res->m[j]=p_One(r);
813822
}
823+
#endif
814824
}
815825
}
816826
}
827+
#ifndef NDEBUG
817828
if (rField_is_Extension(r) && (!p_IsConstantPoly(ff,r)))
818829
{
819830
singclap_factorize_retry++;
@@ -862,6 +873,7 @@ ideal singclap_factorize ( poly f, intvec ** v , int with_exps, const ring r)
862873
res->m[1]=ff; ff=NULL;
863874
}
864875
}
876+
#endif
865877
p_Delete(&ff,r);
866878
if (N!=NULL)
867879
{

0 commit comments

Comments
 (0)