Changeset 9c115e1 in git for factory/cf_gcd_charp.cc


Ignore:
Timestamp:
May 7, 2010, 7:11:37 PM (14 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
0d020e3d4fdcdeca020189f7662a7b5c8692382b
Parents:
88f36448cb6c1a7a2ad8cb4d70d0b24ae8faee61
Message:
pow -> ipower, code cleanup

git-svn-id: file:///usr/local/Singular/svn/trunk@12772 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_gcd_charp.cc

    r88f3644 r9c115e1  
    2626#include <cf_algorithm.h>
    2727#include <cf_map.h>
     28#include <cf_util.h>
    2829
    2930static CanonicalForm contentWRT(const CanonicalForm & F, const int lev);
     
    232233  CanonicalForm result = 0;
    233234  int i, j;
    234   int fieldSize = (int) ::pow(getCharacteristic(), getGFDegree());
     235  int fieldSize = ipower(getCharacteristic(), getGFDegree());
    235236  CanonicalForm g;
    236237  for(i = 0; i <= degree(A); i++)
     
    353354  {
    354355    k=getGFDegree();
    355     fieldSize = (int) ::pow(p, k);
     356    fieldSize = ipower(p, k);
    356357  }
    357358
     
    361362  //  cout << "k: " << k << endl;
    362363  //  cout << "fieldSize: " << fieldSize << endl;
    363   //  cout << "pow: " << pow(p, k) << endl;
     364  //  cout << "pow: " << ipower(p, k) << endl;
    364365  //}
    365366 
     
    510511      }
    511512      int expon = 2; // expon <= will not extend the field
    512       while(::pow(fieldSize, expon) < degMax)
     513      while(ipower(fieldSize, expon) < degMax)
    513514      {
    514515        expon++;
     
    517518      if(k > 1)
    518519      {
    519         if(::pow(p,k * expon) < (1<<16))
     520        if(ipower(p,k * expon) < (1<<16))
    520521        {
    521522          setCharacteristic(p, k * expon, 'b');
     
    541542      else
    542543      {
    543         if(::pow(p,k * expon) < (1<<16))
     544        if(ipower(p,k * expon) < (1<<16))
    544545        {
    545546          setCharacteristic(p, k * expon, 'a');
     
    627628  int k = getGFDegree();
    628629  int p = getCharacteristic();
    629   int fieldSize = pow(p, k);
     630  int fieldSize = ipower(p, k);
    630631  cout << "p: " << p << endl;
    631632  cout << "GFDegree: " << k << endl;
Note: See TracChangeset for help on using the changeset viewer.