Changeset d8b0997 in git


Ignore:
Timestamp:
Aug 15, 2012, 6:43:12 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '96ce329119711a2b80858c8365abd29f8460bbfa')
Children:
ab56fc8edb1c11c3240a168051119e14e5bed4a8
Parents:
3216ecec58ba8ad25e75baee1434546a4f863030
Message:
fix: npInit for large ints
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/modulop.cc

    r3216ec rd8b0997  
    8484number npInit (long i, const coeffs r)
    8585{
    86   long ii=i;
    87   while (ii <  0L)                         ii += (long)r->ch;
    88   while ((ii>1L) && (ii >= ((long)r->ch))) ii -= (long)r->ch;
    89  
     86  long ii=i % (long)r->ch;
     87  if (ii <  0L)                         ii += (long)r->ch;
     88
    9089  number c = (number)ii;
    9190  assume( n_Test(c, r) );
Note: See TracChangeset for help on using the changeset viewer.