Changeset 9fc2688 in git for libpolys/coeffs/rmodulo2m.cc


Ignore:
Timestamp:
Oct 13, 2011, 10:04:22 PM (13 years ago)
Author:
Niels Ranosch <ranosch@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
7cc086cb5be2cac29039c89051bc9f20438a08eb
Parents:
d2f72035f91977026085471ad553a309006a6f66
git-author:
Niels Ranosch <ranosch@mfo.de>2011-10-13 22:04:22+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:14:07+01:00
Message:
CHG: Note that NATNUMBER stands for 'unsigned long' now, and thus its instances can not be negative!
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/rmodulo2m.cc

    rd2f720 r9fc2688  
    470470    power of 2 (<= 2^m) that is contained in b.
    471471  */
    472   assume((NATNUMBER)b != 0);
     472  assume((NATNUMBER) b != 0);
    473473  NATNUMBER g = 1;
    474   NATNUMBER b_div = (NATNUMBER)b;
     474  NATNUMBER b_div = (NATNUMBER) b;
     475 
     476  /*
     477   * b_div is unsigned, so that (b_div < 0) evaluates false at compile-time
     478   *
    475479  if (b_div < 0) b_div = -b_div; // b_div now represents |b|, BUT b_div is unsigned!
     480  */
     481
    476482  NATNUMBER rr = 0;
    477483  while ((g < r->mod2mMask ) && (b_div > 0) && (b_div % 2 == 0))
Note: See TracChangeset for help on using the changeset viewer.