Changeset 8b3556 in git


Ignore:
Timestamp:
Jun 14, 2010, 9:39:20 AM (14 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
24b338287adc0b77efd774500d1ca7fd85341941
Parents:
b2db66a7980736e09e1b452c311fef4820294e96
Message:
fixed conversion from zz_pEX to CF


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

Legend:

Unmodified
Added
Removed
  • factory/NTLconvert.cc

    rb2db66a r8b3556  
    10751075}
    10761076
    1077 CanonicalForm convertNTLzz_pEX2CF (zz_pEX f, Variable x, Variable alpha)
    1078 {
    1079   CanonicalForm bigone= 0;
    1080   for (int j=0;j<=deg(f);j++)
    1081   {
    1082     if (IsOne(coeff(f,j)))
    1083       bigone+=power(x,j);
    1084       else
     1077CanonicalForm convertNTLzz_pEX2CF (zz_pEX f, Variable x, Variable alpha)
     1078{
     1079  CanonicalForm bigone;
     1080  if (deg (f) > 0)
     1081  {
     1082    bigone= 0;
     1083    bigone.mapinto();
     1084    for (int j=0;j<deg(f)+1;j++)
     1085    {
     1086      if (coeff(f,j)!=0)
    10851087      {
    1086         //cout << "hier doof" << "\n";
    1087         CanonicalForm coefficient=convertNTLzzpE2CF(coeff(f,j),alpha);
    1088         //cout << "ja" << "\n";
    1089         if (coeff(f,j)!=0)
    1090           bigone += (power(x,j)*coefficient);
     1088        bigone+=(power(x,j)*convertNTLzzpE2CF(coeff(f,j),alpha));
    10911089      }
    1092   }
     1090    }
     1091  }
     1092  else
     1093  {
     1094    bigone= convertNTLzzpE2CF(coeff(f,0),alpha);
     1095    bigone.mapinto();
     1096  }
     1097  return bigone;
    10931098}
    10941099//----------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.