Changeset 467185 in git


Ignore:
Timestamp:
Oct 3, 2020, 10:15:41 PM (4 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
fe273674fcc014d15e716ef78d58671c3d059cbe
Parents:
0ad478b5513ce05dd620eecf5a82caa75b69fbd3
Message:
fix: omit coeff. 1 in NTL-factorization
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/NTLconvert.cc

    r0ad478 r467185  
    392392  }
    393393  // the content at pos 1
    394   result.insert(CFFactor(CanonicalForm(to_long(rep(cont))),1));
     394  if (!IsOne(cont))
     395    result.insert(CFFactor(CanonicalForm(to_long(rep(cont))),1));
    395396  return result;
    396397}
     
    416417  }
    417418  // the content at pos 1
    418   result.insert(CFFactor(CanonicalForm(to_long(rep(cont))),1));
     419  if (!IsOne(cont))
     420    result.insert(CFFactor(CanonicalForm(to_long(rep(cont))),1));
    419421  return result;
    420422}
     
    859861  }
    860862  // Start by insert the content
    861   result.insert(CFFactor(convertNTLZZpE2CF(cont,alpha),1));
     863  if(!IsOne(cont))
     864    result.insert(CFFactor(convertNTLZZpE2CF(cont,alpha),1));
    862865
    863866  //return the computed CFFList
     
    903906  }
    904907  // Start by insert the constant factor
    905   result.insert(CFFactor(convertNTLzzpE2CF(cont,alpha),1));
     908  if(!IsOne(cont))
     909    result.insert(CFFactor(convertNTLzzpE2CF(cont,alpha),1));
    906910
    907911  //return the computed CFFList
Note: See TracChangeset for help on using the changeset viewer.