Changeset 5a4e17 in git for libpolys/polys/clapsing.cc


Ignore:
Timestamp:
Aug 14, 2013, 5:44:47 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
e7af713b2118666efd56a51c8fd09dcc0b99e0ee
Parents:
adae8b2811aa80401958b914b4cfc7d0ad8eb36b
Message:
chg: improve ntNormalize etc.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/clapsing.cc

    radae8b r5a4e17  
    5959void out_cf(const char *s1,const CanonicalForm &f,const char *s2);
    6060
    61 static poly singclap_gcd_r ( poly f, poly g, const ring r )
     61poly singclap_gcd_r ( poly f, poly g, const ring r )
    6262{
    6363  poly res=NULL;
     
    6666  assume(g!=NULL);
    6767
    68   if((pNext(f)==NULL) && (pNext(g)==NULL))
     68  if(pNext(f)==NULL)
    6969  {
    7070    poly p=p_One(r);
     71    if (pNext(g)==NULL)
     72    {
     73      for(int i=rVar(r);i>0;i--)
     74        p_SetExp(p,i,si_min(p_GetExp(f,i,r),p_GetExp(g,i,r)),r);
     75      p_Setm(p,r);
     76      return p;
     77    }
     78#if 0
     79    else
     80    {
     81      poly h=g;
     82      for(int i=rVar(r);i>0;i--)
     83        p_SetExp(p,i,p_GetExp(f,i,r),r);
     84      while(h!=NULL)
     85      {
     86        for(int i=rVar(r);i>0;i--)
     87          p_SetExp(p,i,si_min(p_GetExp(p,i,r),p_GetExp(h,i,r)),r);
     88        pIter(h);
     89      }
     90      p_Setm(p,r);
     91      return p;
     92    }
     93#endif
     94  }
     95#if 0
     96  else if (pNext(g)==NULL)
     97  {
     98    poly p=p_One(r);
     99    poly h=f;
    71100    for(int i=rVar(r);i>0;i--)
    72       p_SetExp(p,i,si_min(p_GetExp(f,i,r),p_GetExp(g,i,r)),r);
     101      p_SetExp(p,i,p_GetExp(g,i,r),r);
     102    while(h!=NULL)
     103    {
     104      for(int i=rVar(r);i>0;i--)
     105        p_SetExp(p,i,si_min(p_GetExp(p,i,r),p_GetExp(h,i,r)),r);
     106      pIter(h);
     107    }
    73108    p_Setm(p,r);
    74109    return p;
    75110  }
     111#endif
    76112
    77113  Off(SW_RATIONAL);
Note: See TracChangeset for help on using the changeset viewer.