Changeset be63ddc in git


Ignore:
Timestamp:
Feb 7, 2020, 1:53:58 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
61d9a4b5580e0b50dc3d903b076ba95bbe1328f6
Parents:
66355dde14c1dfbe8e22b3c1f13f75cf123ea59b
Message:
fix: bigintmat +- int
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/bigintmat.cc

    r66355dd rbe63ddc  
    200200{
    201201
    202   const int mn = a->rows()*a->cols();
     202  const int mn = si_min(a->rows(),a->cols());
    203203
    204204  const coeffs basecoeffs = a->basecoeffs();
     
    236236bigintmat * bimSub(bigintmat * a, int b)
    237237{
    238   const int mn = a->rows()*a->cols();
     238  const int mn = si_min(a->rows(),a->cols());
    239239
    240240  const coeffs basecoeffs = a->basecoeffs();
     
    245245  bigintmat * bim = new bigintmat(a->rows(),a->cols() , basecoeffs);
    246246
    247   for (i=0; i<mn; i++)
    248     bim->rawset(i, n_Sub((*a)[i], bb, basecoeffs), basecoeffs);
     247  for (i=1; i<=mn; i++)
     248    BIMATELEM(*bim,i,i)=n_Sub(BIMATELEM(*a,i,i), bb, basecoeffs);
    249249
    250250  n_Delete(&bb,basecoeffs);
Note: See TracChangeset for help on using the changeset viewer.