Changeset 4d47990 in git for libpolys/polys


Ignore:
Timestamp:
Aug 6, 2013, 5:48:44 PM (11 years ago)
Author:
Adrian Popescu <adi_popescum@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
adae8b2811aa80401958b914b4cfc7d0ad8eb36b
Parents:
b6ad598b23a5c9dc5da4a07453376a5da78a7fad
git-author:
Adrian Popescu <adi_popescum@yahoo.de>2013-08-06 17:48:44+02:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-08-12 14:05:47+02:00
Message:
makes Setm rely on the integer arithmetic wrapping (-fwrapv) in the computation of orders (due to Hans)

NOTE: i.e. to use unsigned longs instead of longs!
Location:
libpolys/polys/monomials
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/p_polys.cc

    rb6ad598 r4d47990  
    176176    loop
    177177    {
    178       long ord=0;
     178      unsigned long ord=0;
    179179      sro_ord* o=&(r->typ[pos]);
    180180      switch(o->ord_typ)
     
    199199          int *w=o->data.wp.weights;
    200200#if 1
    201           for(int i=a;i<=e;i++) ord+=p_GetExp(p,i,r)*w[i-a];
     201          for(int i=a;i<=e;i++) ord+=((unsigned long)p_GetExp(p,i,r))*((unsigned long)w[i-a]);
    202202#else
    203203          long ai;
  • libpolys/polys/monomials/p_polys.h

    rb6ad598 r4d47990  
    419419      case ro_am:
    420420      case ro_wp_neg:
    421         return (((long)((p)->exp[r->pOrdIndex]))-POLY_NEGWEIGHT_OFFSET);
     421        return ((p->exp[r->pOrdIndex])-POLY_NEGWEIGHT_OFFSET);
    422422      case ro_syzcomp:
    423423      case ro_syz:
Note: See TracChangeset for help on using the changeset viewer.