Changeset 1090a98 in git


Ignore:
Timestamp:
Mar 19, 2012, 8:54:27 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
Children:
823e1a54509e83cc2203b2bdde54b81bb025d7709c4a7d44465c00b389d627b8bb7224b87442db03d4fa6026953a976b4325224da9bad5c085d1d76a
Parents:
6f84e21f0a9c049515af01494fc0832e9afd95d3
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-19 20:54:27+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-03-19 22:10:49+01:00
Message:
fix n_Int of ZERO number over extension fields (alg & trans)
Location:
libpolys/polys/ext_fields
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/ext_fields/algext.cc

    r6f84e21 r1090a98  
    264264  naTest(a);
    265265  poly aAsPoly = (poly)a;
    266   if (!p_IsConstant(aAsPoly, naRing)) return 0;
     266  if(aAsPoly == NULL)
     267    return 0;
     268  if (!p_IsConstant(aAsPoly, naRing))
     269    return 0;
     270  assume( aAsPoly != NULL );
    267271  return n_Int(p_GetCoeff(aAsPoly, naRing), naCoeffs);
    268272}
  • libpolys/polys/ext_fields/transext.cc

    r6f84e21 r1090a98  
    400400  fraction f = (fraction)a;
    401401  if (!DENIS1(f)) return 0;
    402   if (!p_IsConstant(NUM(f), ntRing)) return 0;
    403   return n_Int(p_GetCoeff(NUM(f), ntRing), ntCoeffs);
     402 
     403  const poly aAsPoly = NUM(f);
     404
     405  if(aAsPoly == NULL)
     406    return 0;
     407 
     408  if (!p_IsConstant(aAsPoly, ntRing))
     409    return 0;
     410
     411  assume( aAsPoly != NULL );
     412 
     413  return n_Int(p_GetCoeff(aAsPoly, ntRing), ntCoeffs);
    404414}
    405415
Note: See TracChangeset for help on using the changeset viewer.