Changeset 961c76 in git for libpolys


Ignore:
Timestamp:
Aug 19, 2016, 4:34:25 PM (8 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
a070b84d59be835a2946d1386edd3221d80f3fe7
Parents:
261ee2613fb64ea86222a19e5adc4673b9bc0175
Message:
chg: n_IsMOne for Z/2: maybe n_Zp, n_Zn, n_Z2m
Location:
libpolys/coeffs
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/coeffs.h

    r261ee2 r961c76  
    228228           (*cfIsZero)(number a, const coeffs r),
    229229           (*cfIsOne)(number a, const coeffs r),
     230       // IsMOne is used for printing os polynomials:
     231       // -1 is only printed for constant monomials
    230232           (*cfIsMOne)(number a, const coeffs r),
    231233       //GreaterZero is used for printing of polynomials:
  • libpolys/coeffs/modulop.cc

    r261ee2 r961c76  
    188188  n_Test(a, r);
    189189
    190   return ((r->npPminus1M == (long)a)&&(1L!=(long)a));
     190  return ((r->npPminus1M == (long)a) &&(1L!=(long)a))/*for char 2*/;
    191191}
    192192
  • libpolys/coeffs/rmodulo2m.cc

    r261ee2 r961c76  
    388388BOOLEAN nr2mIsMOne(number a, const coeffs r)
    389389{
    390   return (r->mod2mMask  == (unsigned long)a);
     390  return ((r->mod2mMask  == (unsigned long)a) &&(1L!=(long)a))/*for char 2^1*/;
    391391}
    392392
  • libpolys/coeffs/rmodulon.cc

    r261ee2 r961c76  
    512512  if (a == NULL) return FALSE;
    513513#endif
     514  if(nrnIsOne(a,r)) return FALSE; // for char 2
    514515  mpz_t t; mpz_init_set(t, (mpz_ptr)a);
    515516  mpz_add_ui(t, t, 1);
Note: See TracChangeset for help on using the changeset viewer.