Changeset f5d2963 in git


Ignore:
Timestamp:
Oct 28, 2009, 3:52:40 PM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c1c65551e4b3a0de0b13ddf30446f6e9569681b5')
Children:
7d60f7ef29be846d8ebb02dd71d5c04294bc7831
Parents:
c48e808503cec7132527760979f9671dda451da8
Message:
*lee: new gcd


git-svn-id: file:///usr/local/Singular/svn/trunk@12215 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
factory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • factory/NTLconvert.cc

    rc48e80 rf5d2963  
    1 /* $Id: NTLconvert.cc,v 1.26 2009-06-04 17:50:49 Singular Exp $ */
     1/* $Id: NTLconvert.cc,v 1.27 2009-10-28 14:51:26 Singular Exp $ */
    22#include <config.h>
    33
     
    11021102  return result;
    11031103}
     1104
     1105CanonicalForm convertNTLzz_pEX2CF (zz_pEX f, Variable x, Variable alpha)
     1106{
     1107  CanonicalForm bigone= 0;
     1108  for (int j=0;j<deg(f)+1;j++)
     1109  {
     1110    if (IsOne(coeff(f,j)))
     1111      bigone+=power(x,j);
     1112      else
     1113      {
     1114        //cout << "hier doof" << "\n";
     1115        CanonicalForm coefficient=convertNTLzzpE2CF(coeff(f,j),alpha);
     1116        //cout << "ja" << "\n";
     1117        if (coeff(f,j)!=0)
     1118          bigone += (power(x,j)*coefficient);
     1119      }
     1120  }
     1121}
    11041122#endif
  • factory/cf_gcd_charp.cc

    rc48e80 rf5d2963  
    176176  CanonicalForm interPoly;
    177177
    178   interPoly = oldInterPoly + (u - oldInterPoly(alpha, x)) / newtonPoly(alpha, x) * newtonPoly;
    179 
     178  interPoly = oldInterPoly + ((u - oldInterPoly(alpha, x)) / newtonPoly(alpha, x)) * newtonPoly;
     179  /*cout << "newtonPoly (alpha,x)= " << newtonPoly (alpha,x) << "\n";
     180  cout << "1/newtonPoly (alpha,x)= " << 1/newtonPoly (alpha,x) << "\n";
     181  cout << "newtonPoly (alpha,x)*(1/newtonPoly (alpha,x))= " << newtonPoly (alpha,x)*(1/newtonPoly (alpha,x)) << "\n";*/
    180182  //if(debug)cout << "newtonInterpIncremental output:" << interPoly << endl;
    181183  return interPoly;
     
    219221  }
    220222  //if(debug == 1)cout << "simpleGCD output: " << P1 << endl;
    221   return(P1);
     223  return(P1/lc(P1));
    222224}
    223225
     
    230232  CanonicalForm result = 0;
    231233  int i, j;
    232   int fieldSize = (int)pow(getCharacteristic(), getGFDegree());
     234  int fieldSize = (int) ::pow(getCharacteristic(), getGFDegree());
    233235  CanonicalForm g;
    234236  for(i = 0; i <= degree(A); i++)
     
    351353  {
    352354    k=getGFDegree();
    353     fieldSize = (int)pow(p, k);
     355    fieldSize = (int) ::pow(p, k);
    354356  }
    355357
     
    508510      }
    509511      int expon = 2; // expon <= will not extend the field
    510       while(pow(fieldSize, expon) < degMax)
     512      while(::pow(fieldSize, expon) < degMax)
    511513      {
    512514        expon++;
     
    515517      if(k > 1)
    516518      {
    517         if(pow(p,k * expon) < (1<<16))
     519        if(::pow(p,k * expon) < (1<<16))
    518520        {
    519521          setCharacteristic(p, k * expon, 'b');
     
    539541      else
    540542      {
    541         if(pow(p,k * expon) < (1<<16))
     543        if(::pow(p,k * expon) < (1<<16))
    542544        {
    543545          setCharacteristic(p, k * expon, 'a');
Note: See TracChangeset for help on using the changeset viewer.