Changeset 0e64fdd in git
- Timestamp:
- Jun 11, 1999, 7:13:40 PM (24 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 74fe50d0de12691ddaa37a4a8527e5e220253ab8
- Parents:
- 32820ddece73298afa8bef909edd914a3d0b8c3f
- Location:
- Singular
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/mod2.h.in
r32820d r0e64fdd 227 227 #if SIZEOF_EXPONENT == 1 228 228 #define MAX_EXPONENT 0x7f 229 #define MAX_COMPONENT 0x ff229 #define MAX_COMPONENT 0x7f 230 230 #elif SIZEOF_EXPONENT == 2 231 #define MAX_EXPONENT 0x ffff232 #define MAX_COMPONENT 0x ff231 #define MAX_EXPONENT 0x7fff 232 #define MAX_COMPONENT 0x7fff 233 233 #else /* SIZEOF_EXPONENT == 4 */ 234 234 #define MAX_EXPONENT 0x7fffffff 235 #define MAX_COMPONENT 0x ffffffff235 #define MAX_COMPONENT 0x7fffffff 236 236 #endif 237 237 -
Singular/pcv.cc
r32820d r0e64fdd 2 2 * Computer Algebra System SINGULAR * 3 3 *****************************************/ 4 /* $Id: pcv.cc,v 1.2 4 1999-06-11 14:45:29 SingularExp $ */4 /* $Id: pcv.cc,v 1.25 1999-06-11 17:13:40 mschulze Exp $ */ 5 5 /* 6 6 * ABSTRACT: conversion between polys and coef vectors … … 174 174 for(int i=0;i<pcvMaxDegree;i++) 175 175 pcvIndex[0][i]=i; 176 unsigned k,l; 176 177 for(int i=1;i<pVariables;i++) 177 178 { 178 unsigned x=0;179 k=0; 179 180 for(int j=0;j<pcvMaxDegree;j++) 180 181 { 181 unsigned y=pcvIndex[i-1][j];182 if( y>(unsigned)~0-x)182 l=pcvIndex[i-1][j]; 183 if(l>unsigned(~0)-k) 183 184 { 184 185 j=pcvMaxDegree; … … 186 187 WerrorS("unsigned overflow"); 187 188 } 188 pcvIndex[i][j]=x+=y;189 else pcvIndex[i][j]=k+=l; 189 190 } 190 191 } … … 207 208 int pcvM2N(poly m) 208 209 { 209 unsigned n=0,d =0;210 unsigned n=0,dn,d=0; 210 211 for(int i=0;i<pVariables;i++) 211 212 { 212 213 d+=pGetExp(m,i+1); 213 n+=pcvIndex[i][d]; 214 dn=pcvIndex[i][d]; 215 if(dn>MAX_COMPONENT-n) 216 { 217 i=pVariables; 218 WerrorS("component overflow"); 219 } 220 else n+=dn; 214 221 } 215 222 return n+1; -
Singular/pcv.h
r32820d r0e64fdd 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: pcv.h,v 1.1 2 1999-06-09 11:53:06mschulze Exp $ */4 /* $Id: pcv.h,v 1.13 1999-06-11 17:13:33 mschulze Exp $ */ 5 5 /* 6 6 * ABSTRACT: conversion between polys and coef vectors … … 20 20 void pcvInit(int d); 21 21 void pcvClean(); 22 int pcvM2N(poly m); 23 poly pcvN2M(int n); 22 24 poly pcvP2CV(poly p,int d0,int d1); 23 25 poly pcvCV2P(poly cv,int d0,int d1);
Note: See TracChangeset
for help on using the changeset viewer.