Changeset a2da9e in git


Ignore:
Timestamp:
Nov 9, 2012, 4:10:10 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
6ad7e617261f153fdb030cff36bad4f1639b95e9
Parents:
6ac003ed46c225e8782cb5a59e16ba27d4502496
Message:
fix: init of coeffs in rings
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipshell.cc

    r6ac003 ra2da9e  
    50445044{
    50455045#ifdef HAVE_RINGS
    5046   unsigned int ringtype = 0;
     5046  //unsigned int ringtype = 0;
    50475047  int_number modBase = NULL;
    50485048  unsigned int modExponent = 1;
     
    52125212        /* this branch should be active for modExponent = 2..32 resp. 2..64,
    52135213           depending on the size of a long on the respective platform */
    5214         ringtype = 1;       // Use Z/2^ch
     5214        //ringtype = 1;       // Use Z/2^ch
    52155215        cf=nInitChar(n_Z2m,(void*)(long)modExponent);
    52165216      }
    52175217      else
    52185218      {
    5219         ringtype = 3;
    5220         cf=nInitChar(n_Zn,(void*)(long)modBase);
     5219        //ringtype = 3;
     5220        cf=nInitChar(n_Zpn,(void*)(long)modBase);
    52215221      }
    52225222    }
     
    52245224    else if (cf == NULL)
    52255225    {
    5226       ringtype = 2;
     5226      //ringtype = 2;
    52275227      const int ch = mpz_get_ui(modBase);
    52285228      cf=nInitChar(n_Zn,(void*)(long)ch);
     
    52875287  R->cf = cf;
    52885288
    5289 #ifdef HAVE_RINGS
    5290   // the following should have beed set already into cf, right?!
    5291 //  R->cf->ringtype = ringtype;
    5292 //  R->cf->modBase = modBase;
    5293 //  R->cf->modExponent = modExponent;
    5294 #endif
    5295 
    52965289  /* names and number of variables-------------------------------------*/
    52975290  {
  • libpolys/coeffs/rmodulon.cc

    r6ac003 ra2da9e  
    4040{
    4141  /* test, if r is an instance of nInitCoeffs(n,parameter) */
    42   return (n==n_Zn) && (mpz_cmp(r->modNumber,(mpz_ptr)parameter)==0);
     42  return (n==n_Zn) && (mpz_cmp_ui(r->modNumber,(long)parameter)==0);
    4343}
    4444
Note: See TracChangeset for help on using the changeset viewer.