Changeset 560a3d in git


Ignore:
Timestamp:
Aug 9, 2012, 8:18:56 PM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '96ce329119711a2b80858c8365abd29f8460bbfa')
Children:
824c47a7ef5b40564c34a1392fd8a3a44558959b
Parents:
26261f3e3a71ec10b43bb39f396cf86e27ac06f8
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-08-09 20:18:56+02:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-08-09 20:20:00+02:00
Message:
fixing bug (use of non-initialized value) in nlClearDenominators and minor improvements
Location:
libpolys/coeffs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/coeffs/longrat.cc

    r26261f r560a3d  
    26912691
    26922692  // part 1, collect product of all denominators /gcds
    2693   number cand,cand1;
     2693  number cand;
    26942694  cand=ALLOC_RNUMBER();
    26952695  #if defined(LDEBUG)
     
    27042704  do
    27052705  {
     2706    number& cand1 = numberCollectionEnumerator.Current();
     2707    nlNormalize(cand1, cf);
     2708   
    27062709    if (!(SR_HDL(cand1)&SR_INT))
    27072710    {
    2708       nlNormalize(numberCollectionEnumerator.Current(),cf);
    2709       cand1= numberCollectionEnumerator.Current();
    27102711      if ((!(SR_HDL(cand1)&SR_INT)) // not a short int
    27112712      && (cand1->s==1))             // and is rational
     
    27392740 
    27402741  // part2: all coeffs = all coeffs * cand
    2741   c=cand;
     2742  c = cand;
    27422743  numberCollectionEnumerator.Reset();
    27432744  do
    27442745  {
    2745     number t=nlMult(numberCollectionEnumerator.Current(),cand,cf);
    2746     nlDelete(&numberCollectionEnumerator.Current(),cf);
    2747     nlNormalize(t,cf);
    2748     numberCollectionEnumerator.Current()=t;
     2746    number &n = numberCollectionEnumerator.Current();
     2747    n_InpMult(n, cand, cf);
    27492748  } while (numberCollectionEnumerator.MoveNext() );
    27502749 
  • libpolys/coeffs/numbers.cc

    r26261f r560a3d  
    187187{
    188188  assume( r != NULL );
    189   assume( !(nCoeff_is_Q(r) || nCoeff_is_transExt(r)) );
    190   assume( nCoeff_is_Ring(r) || nCoeff_is_Zp(r) || nCoeff_is_numeric(r) || nCoeff_is_GF(r) || (getCoeffType(r)==n_algExt) );
     189  assume( !(nCoeff_is_Q(r) || nCoeff_is_transExt(r) || nCoeff_is_algExt(r)) );
     190  assume( nCoeff_is_Ring(r) || nCoeff_is_Zp(r) || nCoeff_is_numeric(r) || nCoeff_is_GF(r) );
    191191
    192192  d = n_Init(1, r);
Note: See TracChangeset for help on using the changeset viewer.