Changeset 8a5c49 in git
- Timestamp:
- Aug 12, 2011, 2:07:54 PM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 7fccc79116395e52484b519fc379d165d8cf6bc2
- Parents:
- 95eb6d00149ac8549074f366eba29162578e4ead
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-08-12 14:07:54+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 13:21:27+01:00
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ipassign.cc
r95eb6d r8a5c49 142 142 ideal I=(ideal)IDDATA(h); 143 143 for(i=IDELEMS(I)-1;i>=0;i--) 144 144 I->m[i]=p_MinPolyNormalize(I->m[i], currRing); 145 145 break; 146 146 } … … 161 161 static BOOLEAN jjMINPOLY(leftv res, leftv a) 162 162 { 163 if (getCoeffType(currRing->cf)!=n_transExt) 164 { 165 WerrorS("no minpoly allowed"); 166 return TRUE; 167 } 163 168 number p=(number)a->CopyD(NUMBER_CMD); 164 169 if (nIsZero(p)) 165 170 { 166 currRing->minpoly=NULL;167 naMinimalPoly=NULL;171 WerrorS("cannot set minpoly to 0"); 172 return TRUE; 168 173 } 169 174 else 170 175 { 171 if ((rPar(currRing)!=1) 172 || (rField_is_GF(currRing))) 173 { 174 WerrorS("no minpoly allowed"); 176 // remove all object currently in the ring 177 while(currRing->idroot!=NULL) 178 { 179 killhdl2(currRing->idroot,&(currRing->idroot),currRing); 180 } 181 nNormalize(p); 182 typedef struct { ring r; ideal i; } AlgExtInfo; 183 struct fractionObject 184 { 185 poly numerator; 186 poly denominator; 187 int complexity; 188 }; 189 typedef struct fractionObject * fraction; 190 191 AlgExtInfo A; 192 A.r=currRing->cf->extRing; 193 A.r->ref++; 194 A.i=idInit(1,1); 195 A.i->m[0]=((fraction)p)->numerator; 196 ((fraction)p)->numerator=NULL; 197 n_Delete(&p,currRing->cf); 198 coeffs new_cf=nInitChar(n_algExt,&A); 199 if (new_cf==NULL) 200 { 201 Werror("llegal minpoly"); 202 // cleanup A: TODO 175 203 return TRUE; 176 204 } 177 if (currRing->minpoly!=NULL) 178 { 179 WerrorS("minpoly already set"); 180 return TRUE; 181 } 182 nNormalize(p); 183 currRing->minpoly=p; 184 naMinimalPoly=((lnumber)currRing->minpoly)->z; 185 if (p_GetExp(((lnumber)currRing->minpoly)->z,1,currRing->extRing)==0) 186 { 187 Werror("minpoly must not be constant"); 188 currRing->minpoly=NULL; 189 naMinimalPoly=NULL; 190 nDelete(&p); 191 } 192 /* redefine function pointers due to switch from 193 transcendental to algebraic field extension */ 194 //redefineFunctionPointers(); 195 // and now, normalize all already defined objects in this ring 196 idhdl h=currRing->idroot; 197 while(h!=NULL) 198 { 199 jjMINPOLY_red(h); 200 h=IDNEXT(h); 205 else 206 { 207 nKillChar(currRing->cf); 208 currRing->cf=new_cf; 201 209 } 202 210 } … … 300 308 { 301 309 number p=(number)a->CopyD(BIGINT_CMD); 302 if (res->data!=NULL) n lDelete((number *)&res->data,NULL);310 if (res->data!=NULL) n_Delete((number *)&res->data,coeffs_BIGINT); 303 311 res->data=(void *)p; 304 312 jiAssignAttr(res,a); … … 1054 1062 { 1055 1063 Warn("expression list length(%d) does not match intmat size(%d)", 1056 1064 iv->length()+exprlist_length(hh),iv->length()); 1057 1065 } 1058 1066 break; -
Singular/table.h
r95eb6d r8a5c49 1196 1196 ,{D(jjCOLMAX), VCOLMAX, INT_CMD } 1197 1197 ,{D(jjTIMER), VTIMER, INT_CMD } 1198 #ifdef HAVE_GETTIMEOFDAY 1198 1199 ,{D(jjRTIMER), VRTIMER, INT_CMD } 1200 #endif 1199 1201 ,{D(jjMAXDEG), VMAXDEG, INT_CMD } 1200 1202 ,{D(jjMAXMULT), VMAXMULT, INT_CMD } -
kernel/mod2.h
r95eb6d r8a5c49 24 24 ******************************************************************/ 25 25 26 /*defines, which should be set by configure */ 27 #define HAVE_GETTIMEOFDAY 1 28 #define TIME_WITH_SYS_TIME 1 29 #define HAVE_SYS_TIME_H 1 26 30 /* Default value for timer resolution in ticks per second */ 27 31 /* set to 10 for resolution of tenth of a second, etc */ -
libpolys/coeffs/coeffs.h
r95eb6d r8a5c49 336 336 /// !!! Recommendation: remove implementations for unordered fields 337 337 /// !!! and raise errors instead, in these cases 338 /// !!! Do not follow this recommendation: while writing polys, 339 /// !!! between 2 monomials will be an additional + iff !n_GreaterZero(next coeff) 340 /// 338 341 static inline BOOLEAN n_GreaterZero(number n, const coeffs r) 339 342 {
Note: See TracChangeset
for help on using the changeset viewer.