Changeset f9fc81 in git for libpolys/coeffs/rmodulon.cc


Ignore:
Timestamp:
Dec 6, 2013, 4:57:24 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
f1a309fae2b1e4366fb7ead1dac3f33dbfc042a5
Parents:
bdda288ddec3d88538ca426b802f82d49d384caa9e8a6c3b0f4b1814c8ea54b2bf5679f4c3e9591d
Message:
Merge pull request #444 from surface-smoothers/fix.normal.callbug.in.genus

Fix.normal.callbug.in.genus
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/rmodulon.cc

    r9e8a6c3 rf9fc81  
    4747}
    4848
     49static char* nrnCoeffString(const coeffs r)
     50{
     51  long l = (long)mpz_sizeinbase(r->modBase, 10) +2;
     52  char* b = (char*) omAlloc(l);
     53  b= mpz_get_str (b, 10, r->modBase);
     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);
     57  omFreeSize(b,l);
     58  return s;
     59}
    4960
    5061/* for initializing function pointers */
     
    6071     is a GMP number */
    6172  r->ch = mpz_get_ui(r->modNumber);
     73
     74  r->cfCoeffString = nrnCoeffString;
    6275
    6376  r->cfInit        = nrnInit;
Note: See TracChangeset for help on using the changeset viewer.