Changeset 28f60c in git


Ignore:
Timestamp:
Nov 26, 2009, 3:40:09 PM (14 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
954ea75d96fb42a2592f4aa08cad7778f69766e2
Parents:
6a5712c8ea777d6518549d07dc27a939291bac6d
Message:
allow int/bigint for chinrem

git-svn-id: file:///usr/local/Singular/svn/trunk@12331 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r6a5712c r28f60c  
    10441044    b=pCopy((poly)v->Data());
    10451045    #if 0
    1046     if ((a!=NULL) && (b!=NULL) 
     1046    if ((a!=NULL) && (b!=NULL)
    10471047    && (pLDeg(a,&dummy,currRing)+pLDeg(b,&dummy,currRing)>=currRing->bitmask))
    10481048    {
     
    18451845      for(i=rl-1;i>=0;i--)
    18461846      {
    1847         if (pl->m[i].Typ()!=BIGINT_CMD)
     1847        if (pl->m[i].Typ()==INT_CMD)
     1848        {
     1849          q[i]=nlInit((int)(long)pl->m[i].Data(),currRing);
     1850        }
     1851        else if (pl->m[i].Typ()==BIGINT_CMD)
     1852        {
     1853          q[i]=nlCopy((number)(pl->m[i].Data()));
     1854        }
     1855        else
    18481856        {
    18491857          Werror("bigint expected at pos %d",i+1);
     1858          for(i++;i<rl;i++)
     1859          {
     1860            nlDelete(&(q[i]),currRing);
     1861          }
    18501862          omFree(x); // delete c
    18511863          omFree(q); // delete pl
    18521864          return TRUE;
    18531865        }
    1854         q[i]=(number)(pl->m[i].Data());
    18551866      }
    18561867    }
    18571868    result=idChineseRemainder(x,q,rl);
    1858     if (p!=NULL)
    1859     {
    1860       for(i=rl-1;i>=0;i--)
    1861       {
    1862         nlDelete(&(q[i]),currRing);
    1863       }
     1869    for(i=rl-1;i>=0;i--)
     1870    {
     1871      nlDelete(&(q[i]),currRing);
    18641872    }
    18651873    omFree(q);
     
    26682676    return TRUE;
    26692677  }
    2670  
     2678
    26712679  if (iiOp==NCALGEBRA_CMD)
    26722680  {
     
    27482756{
    27492757  res->data=NULL;
    2750            
     2758
    27512759  if (rIsPluralRing(currRing))
    27522760  {
     
    32173225  }
    32183226  int ii0=idElem(i0); /* size of i0 */
    3219   i1=idSimpleAdd(i1,i0); // 
     3227  i1=idSimpleAdd(i1,i0); //
    32203228  memset(i0->m,0,sizeof(poly)*IDELEMS(i0)); // TODO: memory leak? !!
    32213229  idDelete(&i0);
     
    32393247  BITSET save_test=test;
    32403248  test|=Sy_bit(OPT_SB_1);
    3241   /* IDELEMS(il)-ii0 appears to be the position of the first element of il that 
     3249  /* IDELEMS(il)-ii0 appears to be the position of the first element of il that
    32423250     does not belong to the input ideal */
    32433251  result=kStd(i1,currQuotient,hom,&w,NULL,0,IDELEMS(i1)-ii0);
     
    41204128  {
    41214129    res->data=(void *)(long)idHomModule(v_id,currQuotient,&w);
    4122     if (res->data!=NULL) 
     4130    if (res->data!=NULL)
    41234131    {
    41244132      if (v->rtyp==IDHDL)
     
    42564264  int W = IDELEMS(id);
    42574265
    4258   ideal result = idInit(W * pVariables, id->rank); 
     4266  ideal result = idInit(W * pVariables, id->rank);
    42594267  poly *p = result->m;
    4260        
     4268
    42614269  for( int v = 1; v <= pVariables; v++ )
    42624270  {
    42634271    poly* q = id->m;
    4264     for( int i = 0; i < W; i++, p++, q++ ) 
     4272    for( int i = 0; i < W; i++, p++, q++ )
    42654273      *p = pDiff( *q, v );
    42664274  }
     
    61836191  res->data = (char *)idLiftStd((ideal)u->Data(),
    61846192                                &(hv->data.umatrix),testHomog,
    6185                                 &(hw->data.uideal));
     6193                                &(hw->data.uideal));
    61866194  setFlag(res,FLAG_STD); v->flag=0; w->flag=0;
    61876195  return FALSE;
Note: See TracChangeset for help on using the changeset viewer.