Changeset 240295 in git


Ignore:
Timestamp:
Apr 26, 2013, 1:24:59 PM (9 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '5bec8f88c9ee2573d328cf7c3aff2bcb301d2395')
Children:
3c2c9540b63c2f11ed9fe4817807c8b3e50343186b7484b5930065ac134d995e76335de4928d4e8e
Parents:
a44bcfd7437f94c20602b09730efd48bf03c03ba
Message:
add: n_InpAdd

from master
Location:
libpolys
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/coeffs.h

    ra44bcf r240295  
    190190   /// Inplace: a *= b
    191191   void    (*cfInpMult)(number &a, number b, const coeffs r);
     192
     193   /// Inplace: a += b
     194   void    (*cfInpAdd)(number &a, number b, const coeffs r);
    192195
    193196   /// maps the bigint i (from dummy == coeffs_BIGINT!!!) into the
     
    532535{ assume(r != NULL); assume(r->cfInpMult!=NULL); r->cfInpMult(a,b,r); }
    533536
     537/// addition of 'a' and 'b';
     538/// replacement of 'a' by the sum a+b
     539static inline void n_InpAdd(number &a, number b, const coeffs r)
     540{ assume(r != NULL); assume(r->cfInpAdd!=NULL); r->cfInpAdd(a,b,r); }
     541
    534542/// return the difference of 'a' and 'b', i.e., a-b
    535543static inline number n_Sub(number a, number b, const coeffs r)
  • libpolys/coeffs/longrat.cc

    ra44bcf r240295  
    28882888  //r->cfName = ndName;
    28892889  r->cfInpMult=nlInpMult;
     2890  r->cfInpAdd=nlInpAdd;
    28902891  r->cfInit_bigint=nlCopyMap;
    28912892  r->cfCoeffWrite=nlCoeffWrite;
  • libpolys/coeffs/numbers.cc

    ra44bcf r240295  
    327327    n->cfDelete= ndDelete;
    328328    n->cfInpMult=ndInpMult;
     329    n->cfInpAdd=ndInpAdd;
    329330    n->cfCopy = ndCopy;
    330331    n->cfIntMod=ndIntMod; /* dummy !! */
  • libpolys/polys/templates/p_Numbers.h

    ra44bcf r240295  
    4343
    4444static inline void n_InpAdd_FieldGeneral(number &n1, number n2, const ring r)
    45 { ndInpAdd(n1, n2, r->cf); }
     45{ n_InpAdd(n1, n2, r->cf); }
    4646
    4747#ifdef HAVE_RINGS
     
    5757#define n_InpMult_RingGeneral(n1, n2, r)   ndInpMult(n1, n2, r->cf)
    5858static inline void n_InpAdd_RingGeneral(number &n1, number n2, const ring r)
    59 { assume(rField_is_Ring(r)); ndInpAdd(n1, n2, r->cf); }
     59{ assume(rField_is_Ring(r)); n_InpAdd(n1, n2, r->cf); }
    6060#endif
    6161
Note: See TracChangeset for help on using the changeset viewer.