Changeset 9db01c3 in git
- Timestamp:
- Jul 26, 2018, 9:34:33 AM (5 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- c63efbd28728cfbe9c13a3261352f43a1f82eb02
- Parents:
- 1becad6a5d5cdf8123f9ba9b4b8b35707bc413a9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/coeffs/rmodulo2m.cc
r1becad6 r9db01c3 64 64 static char* nr2mCoeffName(const coeffs cf) 65 65 { 66 static char n2mCoeffName_buf[22]; 67 snprintf(n2mCoeffName_buf,21,"ZZ/(2^%lu)",cf->modExponent); 66 static char n2mCoeffName_buf[30]; 67 if (cf->modExponent>32) /* for 32/64bit arch.*/ 68 snprintf(n2mCoeffName_buf,21,"ZZ/(bigint(2)^%lu)",cf->modExponent); 69 else 70 snprintf(n2mCoeffName_buf,21,"ZZ/(2^%lu)",cf->modExponent); 68 71 return n2mCoeffName_buf; 69 72 } … … 71 74 static void nr2mCoeffWrite (const coeffs r, BOOLEAN /*details*/) 72 75 { 73 Print ("ZZ/(2^%lu)", r->modExponent);76 PrintS(nr2mCoeffName(r)); 74 77 } 75 78 … … 87 90 static char* nr2mCoeffString(const coeffs r) 88 91 { 89 // r->modExponent <=bitsize(long) 90 char* s = (char*) omAlloc(11+11); 91 sprintf(s,"ZZ/(2^%lu)",r->modExponent); 92 return s; 92 return omStrDup(nr2mCoeffName(r)); 93 93 } 94 94
Note: See TracChangeset
for help on using the changeset viewer.