Changeset b4b74c in git


Ignore:
Timestamp:
Oct 23, 2021, 8:38:31 PM (2 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
474eb59e589a28737a03f498f9d8504424271455
Parents:
e2c597cebf3e1f2e5391b7e5756aa240b3fb0ab8
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-10-23 20:38:31+02:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-10-23 20:41:01+02:00
Message:
test p_Content: system("content",p)
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/polylib.lib

    re2c597 rb4b74c  
    906906{
    907907  if (f==0) { return(number(1)); }
    908   if (attrib(basering,"ring_cf")
    909   && ((typeof(f)=="poly")||(typeof(f)=="vector")))
    910   {
    911     number c=leadcoef(f);
    912     while((c!=1)&&(f!=0))
    913     {
    914       c=gcd(c,leadcoef(f));
    915       f=f-lead(f);
    916     }
    917     return(c);
    918   }
    919   else
    920   {
    921     return(leadcoef(f)/leadcoef(cleardenom(f)));
    922   }
     908  return(leadcoef(f)/leadcoef(system("content",f)));
    923909}
    924910example
  • Singular/extra.cc

    re2c597 rb4b74c  
    224224}
    225225
    226 //void emStart();
    227226/*2
    228227*  the "system" command
     
    291290      }
    292291      else
     292/*==================== content ==================================*/
     293    if(strcmp(sys_cmd,"content")==0)
     294    {
     295      if ((h!=NULL) && ((h->Typ()==POLY_CMD)||(h->Typ()==VECTOR_CMD)))
     296      {
     297        int t=h->Typ();
     298        poly p=(poly)h->CopyD();
     299        if (p!=NULL)
     300        {
     301           if (!nCoeff_is_Ring(currRing->cf)) p_Cleardenom(p,currRing);
     302          p_Content(p,currRing);
     303        }
     304        res->data=(void *)p;
     305        res->rtyp=t;
     306        return FALSE;
     307      }
     308      return TRUE;
     309    }
     310    else
    293311/*==================== cpu ==================================*/
    294312    if(strcmp(sys_cmd,"cpu")==0)
Note: See TracChangeset for help on using the changeset viewer.