Changeset c92097b in git


Ignore:
Timestamp:
Jan 4, 2012, 7:48:21 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
4d0cbc73d042b4eff26b590ee72477709df171a3
Parents:
0fc4c8bd0177d4673beebe5a386cd69e4161f080
git-author:
Martin Lee <martinlee84@web.de>2012-01-04 19:48:21+01:00
git-committer:
Martin Lee <martinlee84@web.de>2012-01-05 12:26:44+01:00
Message:
chg: changed behaviour of sqrfree with optional argument 3

(according to master)
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r0fc4c8 rc92097b  
    31523152  int sw=(int)(long)dummy->Data();
    31533153  int fac_sw=sw;
    3154   if ((sw<0)||(sw>2)) fac_sw=1;
     3154  if (sw<0) fac_sw=1;
    31553155  singclap_factorize_retry=0;
    31563156  ideal f=singclap_sqrfree((poly)(u->CopyD()), &v, fac_sw, currRing);
  • libpolys/polys/clapsing.cc

    r0fc4c8 rc92097b  
    969969  {
    970970    res=idInit(1,1);
    971     if (with_exps!=1)
     971    if (with_exps!=1 && with_exps!=3)
    972972    {
    973973      (*v)=new intvec(1);
     
    983983    int e;
    984984    for(i=rVar(r);i>0;i--) if(p_GetExp(f,i,r)!=0) n++;
    985     if (with_exps==0) n++; // with coeff
     985    if (with_exps==0 || with_exps==3) n++; // with coeff
    986986    res=idInit(si_max(n,1),1);
    987987    switch(with_exps)
    988988    {
    989989      case 0: // with coef & exp.
     990        res->m[0]=p_NSet(n_Copy(pGetCoeff(f),r->cf),r);
     991        // no break
     992      case 3: // with coef & exp.
    990993        res->m[0]=p_NSet(n_Copy(pGetCoeff(f),r->cf),r);
    991994        // no break
     
    10411044    //if (f!=NULL) // already tested at start of routine
    10421045    number n0=n_Copy(pGetCoeff(f),r->cf);
    1043     if (with_exps==0)
     1046    if (with_exps==0 || with_exps==3)
    10441047      N=n_Copy(n0,r->cf);
    10451048    p_Cleardenom(f, r);
     
    10481051    NN=n_Div(n0,pGetCoeff(f),r->cf);
    10491052    n_Delete(&n0,r->cf);
    1050     if (with_exps==0)
     1053    if (with_exps==0 || with_exps==3)
    10511054    {
    10521055      n_Delete(&N,r->cf);
     
    10601063    {
    10611064      number n0=n_Copy(pGetCoeff(f),r->cf);
    1062       if (with_exps==0)
     1065      if (with_exps==0 || with_exps==3)
    10631066        N=n_Copy(n0,r->cf);
    10641067      p_Norm(f,r);
     
    10661069      NN=n_Div(n0,pGetCoeff(f),r->cf);
    10671070      n_Delete(&n0,r->cf);
    1068       if (with_exps==0)
     1071      if (with_exps==0 || with_exps==3)
    10691072      {
    10701073        n_Delete(&N,r->cf);
     
    11321135      *v = new intvec( n );
    11331136    }
    1134     else if (L.getFirst().factor().inCoeffDomain())
     1137    else if (L.getFirst().factor().inCoeffDomain() && with_exps!=3)
    11351138    {
    11361139      n--;
     
    11401143    for ( ; J.hasItem(); J++, j++ )
    11411144    {
    1142       if (with_exps!=1) (**v)[j] = J.getItem().exp();
     1145      if (with_exps!=1 && with_exps!=3) (**v)[j] = J.getItem().exp();
    11431146      if (rField_is_Zp(r) || rField_is_Q(r))
    11441147        res->m[j] = convFactoryPSingP( J.getItem().factor(),r );
     
    11661169    int i=IDELEMS(res)-1;
    11671170    int stop=1;
    1168     if (with_exps!=0) stop=0;
     1171    if (with_exps!=0 || with_exps==3) stop=0;
    11691172    for(;i>=stop;i--)
    11701173    {
    11711174      p_Norm(res->m[i],r);
    11721175    }
    1173     if (with_exps==0) p_SetCoeff(res->m[0],old_lead_coeff,r);
     1176    if (with_exps==0 || with_exps==3) p_SetCoeff(res->m[0],old_lead_coeff,r);
    11741177    else n_Delete(&old_lead_coeff,r->cf);
    11751178  }
Note: See TracChangeset for help on using the changeset viewer.