Changeset 7258bd in git


Ignore:
Timestamp:
Dec 5, 2013, 5:58:08 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '48f1dd268d0ff74ef2f7dccbf02545425002ddcc')
Children:
7f974f6a471f29692ae22b5338098c047680b0f78081924f8620f04b5a1659644083d6105daa1a2c
Parents:
867a0d61fbf7341926f962e8afb0e93257ff5745
Message:
 fix: more charstr stuff (tr.237): Z/(n^m)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/rmodulon.cc

    r867a0d r7258bd  
    4949static char* nrnCoeffString(const coeffs r)
    5050{
    51   long l = (long)mpz_sizeinbase(r->modBase, 10) + 2;
     51  long l = (long)mpz_sizeinbase(r->modBase, 10) +2;
    5252  char* b = (char*) omAlloc(l);
    5353  b= mpz_get_str (b, 10, r->modBase);
    54   char* s = (char*) omAlloc(7+2+l);
    55   sprintf(s,"integer,%s",b);
     54  char* s = (char*) omAlloc(7+2+10+l);
     55  if (nCoeff_is_Ring_ModN(r)) sprintf(s,"integer,%s",b);
     56  else /*if (nCoeff_is_Ring_PtoM(r))*/ sprintf(s,"integer,%s^%lu",b,r->modExponent);
    5657  omFreeSize(b,l);
    5758  return s;
Note: See TracChangeset for help on using the changeset viewer.