Changeset 1a3437 in git for libpolys/polys/ext_fields


Ignore:
Timestamp:
Jun 16, 2014, 2:21:49 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
9434d56e8ef4f81efbcce8576989b9e7dba52103
Parents:
754c38259f235b42412a9c3cd9338b6e5151aa8a
Message:
change mod for numbers to mod for bigint, p5
Location:
libpolys/polys/ext_fields
Files:
2 edited

Legend:

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

    r754c382 r1a3437  
    699699      while (xx!=NULL)
    700700      {
    701         bt = n_Gcd(t, pGetCoeff(xx), naRing->cf);
     701        bt = n_SubringGcd(t, pGetCoeff(xx), naRing->cf);
    702702        rr = n_Mult(t, pGetCoeff(xx), naRing->cf);
    703703        n_Delete(&pGetCoeff(xx),naRing->cf);
     
    833833      {
    834834        pIter(ax);
    835         number y = n_Gcd(x, pGetCoeff(ax), naRing->cf);
     835        number y = n_SubringGcd(x, pGetCoeff(ax), naRing->cf);
    836836        n_Delete(&x,naRing->cf);
    837837        x = y;
     
    841841      do
    842842      {
    843         number y = n_Gcd(x, pGetCoeff(bx), naRing->cf);
     843        number y = n_SubringGcd(x, pGetCoeff(bx), naRing->cf);
    844844        n_Delete(&x,naRing->cf);
    845845        x = y;
  • libpolys/polys/ext_fields/transext.cc

    r754c382 r1a3437  
    15611561    {
    15621562      pGcd = pa;
    1563       p_SetCoeff (pGcd, n_Gcd (pGetCoeff(pGcd), pGetCoeff(pb), ntCoeffs), ntRing);
     1563      p_SetCoeff (pGcd, nlGcd (pGetCoeff(pGcd), pGetCoeff(pb), ntCoeffs), ntRing);
    15641564    }
    15651565    else
     
    15711571      while (pb != NULL)
    15721572      {
    1573         tmp = n_Gcd(contentpb, p_GetCoeff(pb, ntRing) , ntCoeffs);
     1573        tmp = n_SubringGcd(contentpb, p_GetCoeff(pb, ntRing) , ntCoeffs);
    15741574        n_Delete(&contentpb, ntCoeffs);
    15751575        contentpb = tmp;
     
    15811581      while (pa != NULL)
    15821582      {
    1583         tmp = n_Gcd(contentpa, p_GetCoeff(pa, ntRing), ntCoeffs);
     1583        tmp = n_SubringGcd(contentpa, p_GetCoeff(pa, ntRing), ntCoeffs);
    15841584        n_Delete(&contentpa, ntCoeffs);
    15851585        contentpa = tmp;
     
    15871587      }
    15881588
    1589       tmp= n_Gcd (contentpb, contentpa, ntCoeffs);
     1589      tmp= n_SubringGcd (contentpb, contentpa, ntCoeffs);
    15901590      n_Delete(&contentpa, ntCoeffs);
    15911591      n_Delete(&contentpb, ntCoeffs);
     
    16501650    {
    16511651      pGcd = pa;
    1652       p_SetCoeff (pGcd, n_Gcd (pGetCoeff(pGcd), pGetCoeff(pb), ntCoeffs), ntRing);
     1652      p_SetCoeff (pGcd, n_SubringGcd (pGetCoeff(pGcd), pGetCoeff(pb), ntCoeffs), ntRing);
    16531653    }
    16541654    else
     
    16601660      while (pb != NULL)
    16611661      {
    1662         tmp = n_Gcd(contentpb, p_GetCoeff(pb, ntRing) , ntCoeffs);
     1662        tmp = n_SubringGcd(contentpb, p_GetCoeff(pb, ntRing) , ntCoeffs);
    16631663        n_Delete(&contentpb, ntCoeffs);
    16641664        contentpb = tmp;
     
    16701670      while (pa != NULL)
    16711671      {
    1672         tmp = n_Gcd(contentpa, p_GetCoeff(pa, ntRing), ntCoeffs);
     1672        tmp = n_SubringGcd(contentpa, p_GetCoeff(pa, ntRing), ntCoeffs);
    16731673        n_Delete(&contentpa, ntCoeffs);
    16741674        contentpa = tmp;
     
    16761676      }
    16771677
    1678       tmp= n_Gcd (contentpb, contentpa, ntCoeffs);
     1678      tmp= n_SubringGcd (contentpb, contentpa, ntCoeffs);
    16791679      n_Delete(&contentpa, ntCoeffs);
    16801680      n_Delete(&contentpb, ntCoeffs);
     
    17011701  return (number)result;
    17021702}
     1703//number ntGcd_dummy(number a, number b, const coeffs cf)
     1704//{
     1705//  extern char my_yylinebuf[80];
     1706//  Print("ntGcd in >>%s<<\n",my_yylinebuf);
     1707//  return ntGcd(a,b,cf);
     1708//}
    17031709
    17041710int ntSize(number a, const coeffs cf)
     
    22692275      if (nCoeff_is_Q (Q))
    22702276      {
    2271         number LcGcd= n_Gcd (p_GetCoeff (cand, R), p_GetCoeff(den, R), Q);
     2277        number LcGcd= n_SubringGcd (p_GetCoeff (cand, R), p_GetCoeff(den, R), Q);
    22722278        gcd = p_Mult_nn(gcd, LcGcd, R);
    22732279        n_Delete(&LcGcd,Q);
     
    24622468  cf->cfDBTest       = ntDBTest;
    24632469#endif
    2464   cf->cfGcd          = ntGcd;
     2470  //cf->cfGcd          = ntGcd_dummy;
     2471  cf->cfSubringGcd   = ntGcd;
    24652472  cf->cfLcm          = ntLcm;
    24662473  cf->cfSize         = ntSize;
Note: See TracChangeset for help on using the changeset viewer.