Changeset bca341 in git for libpolys


Ignore:
Timestamp:
Jun 7, 2012, 5:43:32 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
f0b795a3ce2b873e7524b0af7df2ccd84a3fc628
Parents:
6284186fbb128f1c5a0c99ff170cec4bb5afd5a3
Message:
fix: naIsOne, naIsMOne

improved: algext.cc::definiteReduce
Location:
libpolys
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/bigintmat.cc

    r628418 rbca341  
    1515#include <string.h>
    1616
    17 #define BIMATELEM(M,I,J) (M)[ (M).index(I,J) ]
     17//#define BIMATELEM(M,I,J) (M)[ (M).index(I,J) ]
    1818
    1919bigintmat * bigintmat::transpose()
  • libpolys/polys/ext_fields/algext.cc

    r628418 rbca341  
    206206  naTest(a);
    207207  poly aAsPoly = (poly)a;
    208   if (!p_IsConstant(aAsPoly, naRing)) return FALSE;
     208  if ((a==NULL) || (!p_IsConstant(aAsPoly, naRing))) return FALSE;
    209209  return n_IsOne(p_GetCoeff(aAsPoly, naRing), naCoeffs);
    210210}
     
    214214  naTest(a);
    215215  poly aAsPoly = (poly)a;
    216   if (!p_IsConstant(aAsPoly, naRing)) return FALSE;
     216  if ((a==NULL) || (!p_IsConstant(aAsPoly, naRing))) return FALSE;
    217217  return n_IsMOne(p_GetCoeff(aAsPoly, naRing), naCoeffs);
    218218}
     
    600600  p_Test((poly)reducer, naRing);
    601601  #endif
    602   p_PolyDiv(p, reducer, FALSE, naRing);
     602  if ((p!=NULL) && (p_GetExp(p,1,naRing)>=p_GetExp(reducer,1,naRing)))
     603  {
     604    p_PolyDiv(p, reducer, FALSE, naRing);
     605  }
    603606}
    604607
Note: See TracChangeset for help on using the changeset viewer.