Changeset ca058c in git


Ignore:
Timestamp:
Mar 9, 2012, 12:43:54 PM (12 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
41fea7e7855abb0fa24d84704ca2690c219670fb
Parents:
1ddcde904c894e6fac1afc8cced863fa937c072d
git-author:
Martin Lee <martinlee84@web.de>2012-03-09 12:43:54+01:00
git-committer:
Martin Lee <martinlee84@web.de>2012-04-04 14:42:27+02:00
Message:
fix: some minor bugs
chg: reverseSubstQa now takes an additional argument a polynomial variable
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facMul.cc

    r1ddcde9 rca058c  
    5151
    5252CanonicalForm
    53 reverseSubstQa (const fmpz_poly_t F, int d, const Variable& alpha,
    54                 const CanonicalForm& den)
    55 {
    56   Variable x= Variable (1);
     53reverseSubstQa (const fmpz_poly_t F, int d, const Variable& x,
     54                const Variable& alpha, const CanonicalForm& den)
     55{
    5756
    5857  CanonicalForm result= 0;
     
    115114
    116115  denA *= denB;
    117   A= reverseSubstQa (FLINTA, d, alpha, denA);
     116  A= reverseSubstQa (FLINTA, d, F.mvar(), alpha, denA);
    118117
    119118  fmpz_poly_clear (FLINTA);
     
    226225
    227226  denA *= denB;
    228   A= reverseSubstQa (FLINTA, d, alpha, denA);
     227  A= reverseSubstQa (FLINTA, d, F.mvar(), alpha, denA);
    229228  fmpz_poly_clear (FLINTA);
    230229  fmpz_poly_clear (FLINTB);
     
    519518  if (CFFactory::gettype() == GaloisFieldDomain)
    520519    return mod (F, G);
    521   if (F.inCoeffDomain() && G.isUnivariate())
     520  if (F.inCoeffDomain() && G.isUnivariate() && !G.inCoeffDomain())
    522521  {
    523522    if (b.getp() != 0)
     
    632631  if (CFFactory::gettype() == GaloisFieldDomain)
    633632    return div (F, G);
    634   if (F.inCoeffDomain() && G.isUnivariate())
    635   {
    636     if (b.getp() != 0)
    637       return b(F);
    638     return F;
     633  if (F.inCoeffDomain() && G.isUnivariate() && !G.inCoeffDomain())
     634  {
     635    return 0;
    639636  }
    640637  else if (F.inCoeffDomain() && G.inCoeffDomain())
     
    653650        ZZ_pX NTLf= convertFacCF2NTLZZpX (F);
    654651        ZZ_pE result;
    655         div (result, to_ZZ_pE (NTLg), to_ZZ_pE (NTLf));
     652        div (result, to_ZZ_pE (NTLf), to_ZZ_pE (NTLg));
    656653        return b (convertNTLZZpX2CF (rep (result), alpha));
    657654      }
     
    28422839#ifdef HAVE_FLINT
    28432840  Variable alpha;
     2841  bool isRat= isOn (SW_RATIONAL);
     2842  if (!isRat)
     2843    On (SW_RATIONAL);
    28442844  if (!hasFirstAlgVar (A, alpha) && !hasFirstAlgVar (B, alpha))
    28452845  {
     
    28512851    fmpq_poly_clear (FLINTA);
    28522852    fmpq_poly_clear (FLINTB);
     2853    if (!isRat)
     2854      Off (SW_RATIONAL);
    28532855    return result;
    28542856  }
    2855   bool isRat= isOn (SW_RATIONAL);
    2856   if (!isRat)
    2857     On (SW_RATIONAL);
    28582857  CanonicalForm Q, R;
    28592858  Variable x= Variable (1);
Note: See TracChangeset for help on using the changeset viewer.