Changeset 28f60c in git
- Timestamp:
- Nov 26, 2009, 3:40:09 PM (14 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'd08f5f0bb3329b8ca19f23b74cb1473686415c3a')
- Children:
- 954ea75d96fb42a2592f4aa08cad7778f69766e2
- Parents:
- 6a5712c8ea777d6518549d07dc27a939291bac6d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
r6a5712c r28f60c 1044 1044 b=pCopy((poly)v->Data()); 1045 1045 #if 0 1046 if ((a!=NULL) && (b!=NULL) 1046 if ((a!=NULL) && (b!=NULL) 1047 1047 && (pLDeg(a,&dummy,currRing)+pLDeg(b,&dummy,currRing)>=currRing->bitmask)) 1048 1048 { … … 1845 1845 for(i=rl-1;i>=0;i--) 1846 1846 { 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 1848 1856 { 1849 1857 Werror("bigint expected at pos %d",i+1); 1858 for(i++;i<rl;i++) 1859 { 1860 nlDelete(&(q[i]),currRing); 1861 } 1850 1862 omFree(x); // delete c 1851 1863 omFree(q); // delete pl 1852 1864 return TRUE; 1853 1865 } 1854 q[i]=(number)(pl->m[i].Data());1855 1866 } 1856 1867 } 1857 1868 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); 1864 1872 } 1865 1873 omFree(q); … … 2668 2676 return TRUE; 2669 2677 } 2670 2678 2671 2679 if (iiOp==NCALGEBRA_CMD) 2672 2680 { … … 2748 2756 { 2749 2757 res->data=NULL; 2750 2758 2751 2759 if (rIsPluralRing(currRing)) 2752 2760 { … … 3217 3225 } 3218 3226 int ii0=idElem(i0); /* size of i0 */ 3219 i1=idSimpleAdd(i1,i0); // 3227 i1=idSimpleAdd(i1,i0); // 3220 3228 memset(i0->m,0,sizeof(poly)*IDELEMS(i0)); // TODO: memory leak? !! 3221 3229 idDelete(&i0); … … 3239 3247 BITSET save_test=test; 3240 3248 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 3242 3250 does not belong to the input ideal */ 3243 3251 result=kStd(i1,currQuotient,hom,&w,NULL,0,IDELEMS(i1)-ii0); … … 4120 4128 { 4121 4129 res->data=(void *)(long)idHomModule(v_id,currQuotient,&w); 4122 if (res->data!=NULL) 4130 if (res->data!=NULL) 4123 4131 { 4124 4132 if (v->rtyp==IDHDL) … … 4256 4264 int W = IDELEMS(id); 4257 4265 4258 ideal result = idInit(W * pVariables, id->rank); 4266 ideal result = idInit(W * pVariables, id->rank); 4259 4267 poly *p = result->m; 4260 4268 4261 4269 for( int v = 1; v <= pVariables; v++ ) 4262 4270 { 4263 4271 poly* q = id->m; 4264 for( int i = 0; i < W; i++, p++, q++ ) 4272 for( int i = 0; i < W; i++, p++, q++ ) 4265 4273 *p = pDiff( *q, v ); 4266 4274 } … … 6183 6191 res->data = (char *)idLiftStd((ideal)u->Data(), 6184 6192 &(hv->data.umatrix),testHomog, 6185 6193 &(hw->data.uideal)); 6186 6194 setFlag(res,FLAG_STD); v->flag=0; w->flag=0; 6187 6195 return FALSE;
Note: See TracChangeset
for help on using the changeset viewer.