Changeset 69672d in git


Ignore:
Timestamp:
Feb 16, 2012, 4:28:20 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
46eef0a30be9c81870e8f7f971a5e0748c9e8fcd
Parents:
820046999d8c05256ea9302b64edf55a7cf83946
Message:
fix: pardeg
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r8200469 r69672d  
    2424#include <kernel/febase.h>
    2525#include <Singular/sdb.h>
    26 //#include <polys/ext_fields/longalg.h>
    27 //#include <polys/ext_fields/longtrans.h>
    2826#include <kernel/ideals.h>
    2927#include <polys/prCopy.h>
     
    3432#include <kernel/preimage.h>
    3533
    36 #include <polys/monomials/ring.h>
    3734#include <Singular/subexpr.h>
    3835#include <Singular/lists.h>
     
    223220{
    224221  return pHead(p);
    225 } 
     222}
    226223
    227224int iiTokType(int op)
     
    531528  poly u_p=(poly)u->CopyD(POLY_CMD);
    532529  if ((u_p!=NULL)
    533   && ((v_i!=0) && 
     530  && ((v_i!=0) &&
    534531      ((long)pTotaldegree(u_p) > (signed long)currRing->bitmask / (signed long)v_i)))
    535532  {
     
    13421339  poly r=p; // pointer to the beginning of component i
    13431340  poly o=NULL;
    1344   int i=(int)(long)v->Data();
     1341  unsigned i=(unsigned)(long)v->Data();
    13451342  while (p!=NULL)
    13461343  {
     
    13801377      for(i=0;i<iv->length();i++)
    13811378      {
    1382         if (pGetComp(p)==(*iv)[i])
     1379        if (((int)pGetComp(p))==(*iv)[i])
    13831380        {
    13841381          poly h;
     
    20702067        int r_par=0;
    20712068        char ** r_par_names=NULL;
    2072         if (r->cf->extRing!=NULL) 
     2069        if (r->cf->extRing!=NULL)
    20732070        {
    20742071          r_par=r->cf->extRing->N;
     
    20772074        int c_par=0;
    20782075        char ** c_par_names=NULL;
    2079         if (currRing->cf->extRing!=NULL) 
     2076        if (currRing->cf->extRing!=NULL)
    20802077        {
    20812078          c_par=currRing->cf->extRing->N;
     
    28102807  assumeStdFlag(v);
    28112808  ideal ui=(ideal)u->Data();
    2812   idTest(ui);
    28132809  ideal vi=(ideal)v->Data();
    2814   idTest(vi);
    28152810  res->data = (char *)kNF(vi,currQuotient,ui);
    28162811  return FALSE;
     
    42804275    };
    42814276    typedef struct snumber_dummy  *number_dummy;
    4282  
     4277
    42834278    number_dummy z=(number_dummy)omAlloc(sizeof(snumber_dummy));
    42844279    #if defined(LDEBUG)
     
    44484443  return FALSE;
    44494444}
    4450 static BOOLEAN jjPARDEG(leftv res, leftv)
    4451 {
    4452   if (rField_is_Extension(currRing))
    4453   {
    4454     res->data = (char *)(long)currRing->cf->extRing->pFDeg(
    4455         currRing->cf->extRing->qideal->m[0],
    4456         currRing->cf->extRing);
    4457   }
    4458   else
    4459     res->data = (char *)0L;
     4445static BOOLEAN jjPARDEG(leftv res, leftv v)
     4446{
     4447  res->data = (char *)0L;
     4448  number nn=(number)v->Data();
     4449  if (nn!=NULL)
     4450  {
     4451    if (getCoeffType(currRing->cf)==n_algExt)
     4452    {
     4453      poly qq=(poly)nn;
     4454      res->data = (char *)(long)currRing->cf->extRing->pFDeg(qq,
     4455        currRing->cf->extRing);
     4456    }
     4457    if(getCoeffType(currRing->cf)==n_transExt)
     4458    {
     4459      /* from transext.h:*/
     4460      struct fractionObject
     4461      {
     4462        poly numerator;
     4463        poly denominator;
     4464        int complexity;
     4465      };
     4466      typedef struct fractionObject * fraction;
     4467      #define NUM(f) (((fraction)f)->numerator)
     4468
     4469      fraction qq=(fraction)nn;
     4470      res->data = (char *)(long)currRing->cf->extRing->pFDeg(NUM(qq),
     4471        currRing->cf->extRing);
     4472    }
     4473  }
    44604474  return FALSE;
    44614475}
  • Singular/ipshell.cc

    r8200469 r69672d  
    609609int IsPrime(int p)  /* brute force !!!! */
    610610{
    611   int i,j;
    612611  if      (p == 0)    return 0;
    613612  else if (p == 1)    return 1/*1*/;
     
    618617}
    619618
    620 BOOLEAN iiWRITE(leftv res,leftv v)
     619BOOLEAN iiWRITE(leftv,leftv v)
    621620{
    622621  sleftv vf;
     
    15521551}
    15531552
    1554 idhdl rFindHdl(ring r, idhdl n, idhdl w)
     1553idhdl rFindHdl(ring r, idhdl n, idhdl)
    15551554{
    15561555  idhdl h=rSimpleFindHdl(r,IDROOT,n);
     
    24272426        int par_perm_size=0;
    24282427        nMapFunc nMap;
    2429         BOOLEAN bo;
    24302428
    24312429        if ((nMap=nSetMap(orig_ring->cf))==NULL)
     
    30773075  int     z  = 0;          // number of spectral number equal to smax
    30783076
    3079   int     k = 0;
    3080 
    30813077  while( (*node)!=(spectrumPolyNode*)NULL &&
    30823078         ( fast==0 || (*node)->weight<=smax ) )
     
    33043300spectrumState   spectrumCompute( poly h,lists *L,int fast )
    33053301{
    3306   int i,j;
     3302  int i;
    33073303
    33083304  #ifdef SPECTRUM_DEBUG
     
    42054201  int deg= currRing->pLDeg( gls, &ldummy, currRing );
    42064202  //  int deg= pDeg( gls );
    4207   int len= pLength( gls );
     4203  //  int len= pLength( gls );
    42084204  int i,vpos=0;
    42094205  poly piter;
     
    42654261
    42664262  int elem= roots->getAnzRoots();
    4267   char *out;
    42684263  char *dummy;
    42694264  int j;
     
    44664461  int i,c,count;
    44674462  lists listofroots= NULL;
    4468   lists emptylist;
    44694463  number smv= NULL;
    44704464  BOOLEAN interpolate_det= (mtype==uResultant::denseResMat)?TRUE:FALSE;
     
    45674561lists listOfRoots( rootArranger* self, const unsigned int oprec )
    45684562{
    4569   int i,j,tr;
     4563  int i,j;
    45704564  int count= self->roots[0]->getAnzRoots(); // number of roots
    45714565  int elem= self->roots[0]->getAnzElems();  // number of koordinates per root
     
    46144608void rSetHdl(idhdl h)
    46154609{
    4616   int i;
    46174610  ring rg = NULL;
    46184611  if (h!=NULL)
     
    49544947  int float_len2=0;
    49554948  ring R = NULL;
    4956   idhdl tmp = NULL;
    49574949  BOOLEAN ffChar=FALSE;
    4958   int typ = 1;
    49594950
    49604951  /* ch -------------------------------------------------------*/
    49614952  // get ch of ground field
    4962   int numberOfAllocatedBlocks;
    49634953
    49644954  // allocated ring
     
    50375027  {
    50385028    BOOLEAN complex_flag=(strcmp(pn->name,"complex")==0);
    5039     const int ch=0;
    50405029    if ((pn->next!=NULL) && (pn->next->Typ()==INT_CMD))
    50415030    {
     
    51105099    if (modExponent > 1)
    51115100    {
    5112       const int ch = modExponent;
    51135101      if ((mpz_cmp_ui(modBase, 2) == 0) && (modExponent <= 8*sizeof(NATNUMBER)))
    51145102      {
     
    51565144    while (p != NULL)
    51575145    {
    5158       Print( "pn[%p]: type: %d [%s]: %p, name: %s", p, p->Typ(), Tok2Cmdname(p->Typ()), p->Data(), (p->name == NULL? "NULL" : p->name) );
     5146      Print( "pn[%p]: type: %d [%s]: %p, name: %s", (void*)p, p->Typ(), Tok2Cmdname(p->Typ()), p->Data(), (p->name == NULL? "NULL" : p->name) );
    51595147      PrintLn();
    51605148      p = p->next;
     
    51655153//  pn=pn->next;
    51665154
    5167   int l, last;
    5168   sleftv * sl;
     5155  int l;
    51695156  /*every entry in the new ring is initialized to 0*/
    51705157
     
    52675254  ring R = rCopy0(org_ring);
    52685255  int *perm=(int *)omAlloc0((org_ring->N+1)*sizeof(int));
    5269   int last = 0, o=0, n = rBlocks(org_ring), i=0, typ = 1, j;
     5256  int n = rBlocks(org_ring), i=0, j;
    52705257
    52715258  /* names and number of variables-------------------------------------*/
     
    54375424      r->qideal = NULL;
    54385425    }
    5439     int i=1;
    54405426    int j;
    5441     int *pi=r->order;
    54425427#ifdef USE_IILOCALRING
    54435428    for (j=0;j<iiRETURNEXPR_len;j++)
  • libpolys/polys/ext_fields/algext.h

    r8200469 r69672d  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id$ */
    76/*
    87* ABSTRACT: numbers in an algebraic extension field K[a] / < f(a) >
  • libpolys/polys/ext_fields/transext.cc

    r8200469 r69672d  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id$ */
    54/*
    65* ABSTRACT: numbers in a rational function field K(t_1, .., t_s) with
  • libpolys/polys/ext_fields/transext.h

    r8200469 r69672d  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id$ */
    76/*
    87* ABSTRACT: numbers in a rational function field K(t_1, .., t_s) with
Note: See TracChangeset for help on using the changeset viewer.