Changeset 659036 in git for Singular/ipshell.cc


Ignore:
Timestamp:
Jul 15, 2010, 9:19:45 PM (14 years ago)
Author:
Frank Seelisch <seelisch@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
0f35158095f640c6aeef13c0631e9b146fc2fd5b
Parents:
81ececf82600f3e46a20998d8379da4cfd3c8b30
Message:
fixed criterion when to use Z/2^n implementation and when Z/m; previous version used Z/m for 2^31 / 2^63 resp.; new version will still use Z/2^n in this case

git-svn-id: file:///usr/local/Singular/svn/trunk@13028 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipshell.cc

    r81ececf r659036  
    19741974  {
    19751975    R->ch = R->ringflagb;
    1976     if ((mpz_cmp_ui(R->ringflaga, 2) == 0) && (R->ringflagb + 2 <= 8*sizeof(NATNUMBER)))
    1977     {
     1976    if ((mpz_cmp_ui(R->ringflaga, 2) == 0) && (R->ringflagb < 8*sizeof(NATNUMBER)))
     1977    {
     1978      /* this branch should be active for ringflagb = 2..31 resp. 2..63;
     1979         note that 2^31 resp 2^63 is the largest power of 2 that fits into
     1980         an unsigned long */
    19781981      R->ringtype = 1;       // Use Z/2^ch
    19791982    }
     
    47584761    {
    47594762      ch = ringflagb;
    4760       if ((mpz_cmp_ui(ringflaga, 2) == 0) && (ringflagb + 2 <= 8*sizeof(NATNUMBER)))
    4761       {
     4763      if ((mpz_cmp_ui(ringflaga, 2) == 0) && (ringflagb < 8*sizeof(NATNUMBER)))
     4764      {
     4765        /* this branch should be active for ringflagb = 2..31 resp. 2..63;
     4766           note that 2^31 resp 2^63 is the largest power of 2 that fits into
     4767           an unsigned long */
    47624768        ringtype = 1;       // Use Z/2^ch
    47634769      }
Note: See TracChangeset for help on using the changeset viewer.