Changeset 5a9fa5 in git


Ignore:
Timestamp:
Aug 9, 2012, 12:01:57 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '96ce329119711a2b80858c8365abd29f8460bbfa')
Children:
26261f3e3a71ec10b43bb39f396cf86e27ac06f8
Parents:
1d579f645ed6a1c4f08c80546ec23f4e273a7dde
Message:
fix: mod_ now indep. of implementation details of mod
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/decodegb.lib

    r1d579f6 r5a9fa5  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id$";
     2version="$Id: decodegb.lib 15103 2012-07-11 10:00:13Z motsak $";
    33category="Coding theory";
    44info="
     
    274274static proc mod_ (int n, int m)
    275275{
    276   if (n mod m==0) {return(m);}
    277   if (n mod m!=0) {return(n mod m);}
     276  n=n mod m;
     277  if (n<=0){ return(n+m);}
     278  return(n);
    278279}
    279280
Note: See TracChangeset for help on using the changeset viewer.