Changeset 35e86e in git


Ignore:
Timestamp:
Sep 15, 2011, 2:18:54 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '3a4bc649f1d0185cc9f8b122bd75f21f75ac9c9a')
Children:
39457c270cead007eb9cc693d50b312d65eabc32
Parents:
08d98ae048a05828b24cde40029dac44a9c8f4cc
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-09-15 14:18:54+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:12:50+01:00
Message:
fix: naPower/ntPower for exp 0,1,-1
Location:
libpolys/polys/ext_fields
Files:
2 edited

Legend:

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

    r08d98a r35e86e  
    354354    else          WerrorS(nDivBy0);
    355355  }
    356   else if (exp ==  0) *b = naInit(1, cf);
    357   else if (exp ==  1) *b = naCopy(a, cf);
    358   else if (exp == -1) *b = naInvers(a, cf);
     356  else if (exp ==  0) { *b = naInit(1, cf); return; }
     357  else if (exp ==  1) { *b = naCopy(a, cf); return; }
     358  else if (exp == -1) { *b = naInvers(a, cf); return; }
    359359 
    360360  int expAbs = exp; if (expAbs < 0) expAbs = -expAbs;
  • libpolys/polys/ext_fields/transext.cc

    r08d98a r35e86e  
    546546    else          WerrorS(nDivBy0);
    547547  }
    548   else if (exp ==  0) *b = ntInit(1, cf);
    549   else if (exp ==  1) *b = ntCopy(a, cf);
    550   else if (exp == -1) *b = ntInvers(a, cf);
     548  else if (exp ==  0) { *b = ntInit(1, cf); return;}
     549  else if (exp ==  1) { *b = ntCopy(a, cf); return;}
     550  else if (exp == -1) { *b = ntInvers(a, cf); return;}
    551551 
    552552  int expAbs = exp; if (expAbs < 0) expAbs = -expAbs;
Note: See TracChangeset for help on using the changeset viewer.