Changeset 69672d in git
- Timestamp:
- Feb 16, 2012, 4:28:20 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 46eef0a30be9c81870e8f7f971a5e0748c9e8fcd
- Parents:
- 820046999d8c05256ea9302b64edf55a7cf83946
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
r8200469 r69672d 24 24 #include <kernel/febase.h> 25 25 #include <Singular/sdb.h> 26 //#include <polys/ext_fields/longalg.h>27 //#include <polys/ext_fields/longtrans.h>28 26 #include <kernel/ideals.h> 29 27 #include <polys/prCopy.h> … … 34 32 #include <kernel/preimage.h> 35 33 36 #include <polys/monomials/ring.h>37 34 #include <Singular/subexpr.h> 38 35 #include <Singular/lists.h> … … 223 220 { 224 221 return pHead(p); 225 } 222 } 226 223 227 224 int iiTokType(int op) … … 531 528 poly u_p=(poly)u->CopyD(POLY_CMD); 532 529 if ((u_p!=NULL) 533 && ((v_i!=0) && 530 && ((v_i!=0) && 534 531 ((long)pTotaldegree(u_p) > (signed long)currRing->bitmask / (signed long)v_i))) 535 532 { … … 1342 1339 poly r=p; // pointer to the beginning of component i 1343 1340 poly o=NULL; 1344 int i=(int)(long)v->Data();1341 unsigned i=(unsigned)(long)v->Data(); 1345 1342 while (p!=NULL) 1346 1343 { … … 1380 1377 for(i=0;i<iv->length();i++) 1381 1378 { 1382 if ( pGetComp(p)==(*iv)[i])1379 if (((int)pGetComp(p))==(*iv)[i]) 1383 1380 { 1384 1381 poly h; … … 2070 2067 int r_par=0; 2071 2068 char ** r_par_names=NULL; 2072 if (r->cf->extRing!=NULL) 2069 if (r->cf->extRing!=NULL) 2073 2070 { 2074 2071 r_par=r->cf->extRing->N; … … 2077 2074 int c_par=0; 2078 2075 char ** c_par_names=NULL; 2079 if (currRing->cf->extRing!=NULL) 2076 if (currRing->cf->extRing!=NULL) 2080 2077 { 2081 2078 c_par=currRing->cf->extRing->N; … … 2810 2807 assumeStdFlag(v); 2811 2808 ideal ui=(ideal)u->Data(); 2812 idTest(ui);2813 2809 ideal vi=(ideal)v->Data(); 2814 idTest(vi);2815 2810 res->data = (char *)kNF(vi,currQuotient,ui); 2816 2811 return FALSE; … … 4280 4275 }; 4281 4276 typedef struct snumber_dummy *number_dummy; 4282 4277 4283 4278 number_dummy z=(number_dummy)omAlloc(sizeof(snumber_dummy)); 4284 4279 #if defined(LDEBUG) … … 4448 4443 return FALSE; 4449 4444 } 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; 4445 static 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 } 4460 4474 return FALSE; 4461 4475 } -
Singular/ipshell.cc
r8200469 r69672d 609 609 int IsPrime(int p) /* brute force !!!! */ 610 610 { 611 int i,j;612 611 if (p == 0) return 0; 613 612 else if (p == 1) return 1/*1*/; … … 618 617 } 619 618 620 BOOLEAN iiWRITE(leftv res,leftv v)619 BOOLEAN iiWRITE(leftv,leftv v) 621 620 { 622 621 sleftv vf; … … 1552 1551 } 1553 1552 1554 idhdl rFindHdl(ring r, idhdl n, idhdl w)1553 idhdl rFindHdl(ring r, idhdl n, idhdl) 1555 1554 { 1556 1555 idhdl h=rSimpleFindHdl(r,IDROOT,n); … … 2427 2426 int par_perm_size=0; 2428 2427 nMapFunc nMap; 2429 BOOLEAN bo;2430 2428 2431 2429 if ((nMap=nSetMap(orig_ring->cf))==NULL) … … 3077 3075 int z = 0; // number of spectral number equal to smax 3078 3076 3079 int k = 0;3080 3081 3077 while( (*node)!=(spectrumPolyNode*)NULL && 3082 3078 ( fast==0 || (*node)->weight<=smax ) ) … … 3304 3300 spectrumState spectrumCompute( poly h,lists *L,int fast ) 3305 3301 { 3306 int i ,j;3302 int i; 3307 3303 3308 3304 #ifdef SPECTRUM_DEBUG … … 4205 4201 int deg= currRing->pLDeg( gls, &ldummy, currRing ); 4206 4202 // int deg= pDeg( gls ); 4207 int len= pLength( gls );4203 // int len= pLength( gls ); 4208 4204 int i,vpos=0; 4209 4205 poly piter; … … 4265 4261 4266 4262 int elem= roots->getAnzRoots(); 4267 char *out;4268 4263 char *dummy; 4269 4264 int j; … … 4466 4461 int i,c,count; 4467 4462 lists listofroots= NULL; 4468 lists emptylist;4469 4463 number smv= NULL; 4470 4464 BOOLEAN interpolate_det= (mtype==uResultant::denseResMat)?TRUE:FALSE; … … 4567 4561 lists listOfRoots( rootArranger* self, const unsigned int oprec ) 4568 4562 { 4569 int i,j ,tr;4563 int i,j; 4570 4564 int count= self->roots[0]->getAnzRoots(); // number of roots 4571 4565 int elem= self->roots[0]->getAnzElems(); // number of koordinates per root … … 4614 4608 void rSetHdl(idhdl h) 4615 4609 { 4616 int i;4617 4610 ring rg = NULL; 4618 4611 if (h!=NULL) … … 4954 4947 int float_len2=0; 4955 4948 ring R = NULL; 4956 idhdl tmp = NULL;4957 4949 BOOLEAN ffChar=FALSE; 4958 int typ = 1;4959 4950 4960 4951 /* ch -------------------------------------------------------*/ 4961 4952 // get ch of ground field 4962 int numberOfAllocatedBlocks;4963 4953 4964 4954 // allocated ring … … 5037 5027 { 5038 5028 BOOLEAN complex_flag=(strcmp(pn->name,"complex")==0); 5039 const int ch=0;5040 5029 if ((pn->next!=NULL) && (pn->next->Typ()==INT_CMD)) 5041 5030 { … … 5110 5099 if (modExponent > 1) 5111 5100 { 5112 const int ch = modExponent;5113 5101 if ((mpz_cmp_ui(modBase, 2) == 0) && (modExponent <= 8*sizeof(NATNUMBER))) 5114 5102 { … … 5156 5144 while (p != NULL) 5157 5145 { 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) ); 5159 5147 PrintLn(); 5160 5148 p = p->next; … … 5165 5153 // pn=pn->next; 5166 5154 5167 int l, last; 5168 sleftv * sl; 5155 int l; 5169 5156 /*every entry in the new ring is initialized to 0*/ 5170 5157 … … 5267 5254 ring R = rCopy0(org_ring); 5268 5255 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; 5270 5257 5271 5258 /* names and number of variables-------------------------------------*/ … … 5437 5424 r->qideal = NULL; 5438 5425 } 5439 int i=1;5440 5426 int j; 5441 int *pi=r->order;5442 5427 #ifdef USE_IILOCALRING 5443 5428 for (j=0;j<iiRETURNEXPR_len;j++) -
libpolys/polys/ext_fields/algext.h
r8200469 r69672d 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id$ */7 6 /* 8 7 * ABSTRACT: numbers in an algebraic extension field K[a] / < f(a) > -
libpolys/polys/ext_fields/transext.cc
r8200469 r69672d 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id$ */5 4 /* 6 5 * ABSTRACT: numbers in a rational function field K(t_1, .., t_s) with -
libpolys/polys/ext_fields/transext.h
r8200469 r69672d 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id$ */7 6 /* 8 7 * ABSTRACT: numbers in a rational function field K(t_1, .., t_s) with
Note: See TracChangeset
for help on using the changeset viewer.