Changeset b1d287 in git


Ignore:
Timestamp:
Aug 1, 2012, 2:25:24 AM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '96ce329119711a2b80858c8365abd29f8460bbfa')
Children:
0df59c8a8e59eded04e4aca4e57cfed188a00cf1
Parents:
09afeb85ea17e564813761786f76281c8162dad0362fc6799a207ad61d3be8abe0206e52b5782e50
Message:
Merge pull request #157 from mmklee/factory_catch_up_sw

Factory catch up sw
Files:
154 edited

Legend:

Unmodified
Added
Removed
  • Singular/silink.cc

    r362fc67 rb1d287  
    338338      Werror("dump: Error for link of type %s, mode: %s, name: %s",
    339339             l->m->type, l->mode, l->name);
     340
     341    slClose(l);
    340342    return res;
    341343  }
  • factory/DegreePattern.cc

    r09afeb rb1d287  
    77 *
    88 * @author Martin Lee
    9  *
    10  * @internal @version \$Id$
    119 *
    1210 **/
  • factory/DegreePattern.h

    r09afeb rb1d287  
    77 *
    88 * @author Martin Lee
    9  *
    10  * @internal @version \$Id$
    119 *
    1210 **/
  • factory/ExtensionInfo.cc

    r09afeb rb1d287  
    77 *
    88 * @author Martin Lee
    9  *
    10  * @internal @version \$Id$
    119 *
    1210 **/
  • factory/ExtensionInfo.h

    r09afeb rb1d287  
    99 *
    1010 * @author Martin Lee
    11  *
    12  * @internal @version \$Id$
    1311 *
    1412 **/
  • factory/NTLconvert.cc

    r09afeb rb1d287  
    1 /* $Id$ */
    21#include "config.h"
    32
  • factory/NTLconvert.h

    r09afeb rb1d287  
    1 /* $Id$ */
    21#ifndef INCL_NTLCONVERT_H
    32#define INCL_NTLCONVERT_H
  • factory/canonicalform.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/canonicalform.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CANONICALFORM_H
  • factory/cfModResultant.cc

    r09afeb rb1d287  
    77 *
    88 * @author Martin Lee
    9  *
    10  * @internal @version \$Id$
    119 *
    1210 **/
  • factory/cfModResultant.h

    r09afeb rb1d287  
    88 *
    99 * @author Martin Lee
    10  *
    11  * @internal @version \$Id$
    1210 *
    1311 **/
  • factory/cfNewtonPolygon.cc

    r09afeb rb1d287  
    88 *
    99 * @author Martin Lee
    10  *
    11  * @internal
    12  * @version \$Id$
    1310 *
    1411 **/
  • factory/cfNewtonPolygon.h

    r09afeb rb1d287  
    88 *
    99 * @author Martin Lee
    10  *
    11  * @internal
    12  * @version \$Id$
    1310 *
    1411 **/
  • factory/cf_algorithm.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/cf_algorithm.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_ALGORITHM_H
  • factory/cf_assert.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C -*- */
    2 /* $Id$ */
    32
    43/* This is for compatibility with standard cf_assert.h */
  • factory/cf_binom.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/cf_binom.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_BINOM_H
  • factory/cf_char.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/cf_chinese.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/cf_cyclo.cc

    r09afeb rb1d287  
    1010 * @par Copyright:
    1111 *   (c) by The SINGULAR Team, see LICENSE file
    12  *
    13  * @internal
    14  * @version \$Id$
    1512 *
    1613**/
  • factory/cf_cyclo.h

    r09afeb rb1d287  
    1313 *   (c) by The SINGULAR Team, see LICENSE file
    1414 *
    15  * @internal
    16  * @version \$Id$
    17  *
    1815**/
    1916//*****************************************************************************
  • factory/cf_defs.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_DEFS_H
  • factory/cf_eval.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/cf_eval.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_EVAL_H
  • factory/cf_factor.cc

    r09afeb rb1d287  
    1 /* Emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
     1/* emacs edit mode for this file is -*- C++ -*- */
    32
    43//{{{ docu
  • factory/cf_factory.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/cf_factory.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_FACTORY_H
  • factory/cf_gcd.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
     
    12331232  cl =  gcd (f.lc(),g.lc());
    12341233  CanonicalForm gcdcfcg= gcd (cf, cg);
     1234  CanonicalForm fp, gp;
    12351235  CanonicalForm b= 1;
    12361236  int minCommonDeg= 0;
     
    12601260
    12611261  CanonicalForm cof, cog, cofp, cogp, newCof, newCog, cofn, cogn;
     1262  int maxNumVars= tmax (getNumVars (f), getNumVars (g));
    12621263  //Off (SW_RATIONAL);
    12631264  while ( true )
     
    12721273    //printf("try p=%d\n",p);
    12731274    setCharacteristic( p );
     1275    fp= mapinto (f);
     1276    gp= mapinto (g);
    12741277#ifdef HAVE_NTL
    1275     Dp = GCD_small_p (mapinto (f), mapinto (g), cofp, cogp);
     1278    if (size (fp)/maxNumVars > 500 && size (gp)/maxNumVars > 500)
     1279      Dp = GCD_small_p (fp, gp, cofp, cogp);
     1280    else
     1281    {
     1282      Dp= gcd_poly (fp, gp);
     1283      cofp= fp/Dp;
     1284      cogp= gp/Dp;
     1285    }
    12761286#else
    1277     Dp= gcd_poly (mapinto (f), mapinto (g));
    1278     cofp= mapinto (f)/Dp;
    1279     cogp= mapinto (g)/Dp;
     1287    Dp= gcd_poly (fp, gp);
     1288    cofp= fp/Dp;
     1289    cogp= gp/Dp;
    12801290#endif
    12811291    Dp /=Dp.lc();
  • factory/cf_gcd_smallp.cc

    r09afeb rb1d287  
    1212 * @par Copyright:
    1313 *   (c) by The SINGULAR Team, see LICENSE file
    14  *
    15  * @internal
    16  * @version \$Id$
    1714 *
    1815**/
     
    539536  CanonicalForm gcdcAcB;
    540537
    541   if (topLevel)
    542   {
    543     if (best_level <= 2)
    544       gcdcAcB= extractContents (A, B, cA, cB, ppA, ppB, best_level);
    545     else
    546       gcdcAcB= extractContents (A, B, cA, cB, ppA, ppB, 2);
    547   }
    548   else
    549   {
    550     cA = uni_content (A);
    551     cB = uni_content (B);
    552     gcdcAcB= gcd (cA, cB);
    553     ppA= A/cA;
    554     ppB= B/cB;
    555   }
     538  cA = uni_content (A);
     539  cB = uni_content (B);
     540  gcdcAcB= gcd (cA, cB);
     541  ppA= A/cA;
     542  ppB= B/cB;
    556543
    557544  int sizeNewtonPolyg;
     
    1005992  CanonicalForm gcdcAcB;
    1006993
    1007   if (topLevel)
    1008   {
    1009     if (best_level <= 2)
    1010       gcdcAcB= extractContents (A, B, cA, cB, ppA, ppB, best_level);
    1011     else
    1012       gcdcAcB= extractContents (A, B, cA, cB, ppA, ppB, 2);
    1013   }
    1014   else
    1015   {
    1016     cA = uni_content (A);
    1017     cB = uni_content (B);
    1018     gcdcAcB= gcd (cA, cB);
    1019     ppA= A/cA;
    1020     ppB= B/cB;
    1021   }
     994  cA = uni_content (A);
     995  cB = uni_content (B);
     996  gcdcAcB= gcd (cA, cB);
     997  ppA= A/cA;
     998  ppB= B/cB;
    1022999
    10231000  int sizeNewtonPolyg;
     
    14621439  CanonicalForm gcdcAcB;
    14631440
    1464   if (topLevel)
    1465   {
    1466     if (best_level <= 2)
    1467       gcdcAcB= extractContents (A, B, cA, cB, ppA, ppB, best_level);
    1468     else
    1469       gcdcAcB= extractContents (A, B, cA, cB, ppA, ppB, 2);
    1470   }
    1471   else
    1472   {
    1473     cA = uni_content (A);
    1474     cB = uni_content (B);
    1475     gcdcAcB= gcd (cA, cB);
    1476     ppA= A/cA;
    1477     ppB= B/cB;
    1478   }
     1441  cA = uni_content (A);
     1442  cB = uni_content (B);
     1443  gcdcAcB= gcd (cA, cB);
     1444  ppA= A/cA;
     1445  ppB= B/cB;
    14791446
    14801447  int sizeNewtonPolyg;
     
    32333200  CanonicalForm ppA, ppB;    // primitive part of A and B
    32343201  CanonicalForm gcdcAcB;
    3235   if (topLevel)
    3236   {
    3237     if (best_level <= 2)
    3238       gcdcAcB= extractContents (A, B, cA, cB, ppA, ppB, best_level);
    3239     else
    3240       gcdcAcB= extractContents (A, B, cA, cB, ppA, ppB, 2);
    3241   }
    3242   else
    3243   {
    3244     cA = uni_content (A);
    3245     cB = uni_content (B);
    3246     gcdcAcB= gcd (cA, cB);
    3247     ppA= A/cA;
    3248     ppB= B/cB;
    3249   }
     3202
     3203  cA = uni_content (A);
     3204  cB = uni_content (B);
     3205  gcdcAcB= gcd (cA, cB);
     3206  ppA= A/cA;
     3207  ppB= B/cB;
    32503208
    32513209  CanonicalForm lcA, lcB;  // leading coefficients of A and B
     
    36443602  CanonicalForm ppA, ppB;    // primitive part of A and B
    36453603  CanonicalForm gcdcAcB;
    3646   if (topLevel)
    3647   {
    3648     if (best_level <= 2)
    3649       gcdcAcB= extractContents (A, B, cA, cB, ppA, ppB, best_level);
    3650     else
    3651       gcdcAcB= extractContents (A, B, cA, cB, ppA, ppB, 2);
    3652   }
    3653   else
    3654   {
    3655     cA = uni_content (A);
    3656     cB = uni_content (B);
    3657     gcdcAcB= gcd (cA, cB);
    3658     ppA= A/cA;
    3659     ppB= B/cB;
    3660   }
     3604
     3605  cA = uni_content (A);
     3606  cB = uni_content (B);
     3607  gcdcAcB= gcd (cA, cB);
     3608  ppA= A/cA;
     3609  ppB= B/cB;
    36613610
    36623611  CanonicalForm lcA, lcB;  // leading coefficients of A and B
  • factory/cf_gcd_smallp.h

    r09afeb rb1d287  
    1616 * @par Copyright:
    1717 *   (c) by The SINGULAR Team, see LICENSE file
    18  *
    19  * @internal
    20  * @version \$Id$
    2118 *
    2219**/
  • factory/cf_generator.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/cf_generator.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_GENERATOR_H
  • factory/cf_globals.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/cf_globals.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_GLOBALS_H
  • factory/cf_hnf.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
     
    1312
    1413#ifdef HAVE_NTL
    15 #if 1
    1614#include "NTLconvert.h"
    1715#include "canonicalform.h"
     
    5654}
    5755#endif
    58 #endif
  • factory/cf_hnf.h

    r09afeb rb1d287  
    66
    77#ifdef HAVE_NTL
    8 
    9 /* $Id$ */
    108
    119//{{{ docu
  • factory/cf_inline.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/cf_irred.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/cf_irred.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_IRRED_H
  • factory/cf_iter.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/cf_iter.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_ITER_H
  • factory/cf_iter_inline.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/cf_linsys.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/cf_map.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/cf_map.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_MAP_H
  • factory/cf_map_ext.cc

    r09afeb rb1d287  
    1010 * @par Copyright:
    1111 *   (c) by The SINGULAR Team, see LICENSE file
    12  *
    13  * @internal
    14  * @version \$Id$
    1512 *
    1613**/
  • factory/cf_map_ext.h

    r09afeb rb1d287  
    1212 * @par Copyright:
    1313 *   (c) by The SINGULAR Team, see LICENSE file
    14  *
    15  * @internal
    16  * @version \$Id$
    1714 *
    1815**/
  • factory/cf_ops.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/cf_primes.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/cf_primes.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_PRIMES_H
  • factory/cf_primetab.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/cf_primetab.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_PRIMETAB_H
  • factory/cf_random.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/cf_random.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_RANDOM_H
  • factory/cf_resultant.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/cf_reval.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#define MORE_ZEROES
  • factory/cf_reval.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_REVAL_H
  • factory/cf_switches.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/cf_switches.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_SWITCHES_H
  • factory/cf_util.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/cf_util.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_CF_UTIL_H
  • factory/debug.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43static int deb_level = -1;
  • factory/debug.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43/* It should be possible to include this file multiple times for different */
  • factory/examples/application.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/examples/factorize.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/examples/gcd.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/facAlgExt.cc

    r09afeb rb1d287  
    1111 * @par Copyright:
    1212 *   (c) by The SINGULAR Team, see LICENSE file
    13  *
    14  * @internal
    15  * @version \$Id$
    1613 *
    1714**/
  • factory/facAlgExt.h

    r09afeb rb1d287  
    1212 * @par Copyright:
    1313 *   (c) by The SINGULAR Team, see LICENSE file
    14  *
    15  * @internal
    16  * @version \$Id$
    1714 *
    1815**/
  • factory/facBivar.cc

    r09afeb rb1d287  
    77 *
    88 * @author Martin Lee
    9  *
    10  * @internal @version \$Id$
    119 *
    1210 **/
  • factory/facBivar.h

    r09afeb rb1d287  
    77 *
    88 * @author Martin Lee
    9  *
    10  * @internal @version \$Id$
    119 *
    1210 **/
  • factory/facFactorize.cc

    r09afeb rb1d287  
    77 *
    88 * @author Martin Lee
    9  *
    10  * @internal @version \$Id$
    119 *
    1210 **/
     
    3129#include "facSparseHensel.h"
    3230
    33 TIMING_DEFINE_PRINT(bi_factorize)
    34 TIMING_DEFINE_PRINT(hensel_lift)
    35 TIMING_DEFINE_PRINT(factor_recombination)
     31TIMING_DEFINE_PRINT(fac_bi_factorize)
     32TIMING_DEFINE_PRINT(fac_hensel_lift)
     33TIMING_DEFINE_PRINT(fac_factor_recombination)
    3634
    3735#ifdef HAVE_NTL
     
    717715    bufLift= degree (A, y) + 1 + degree (LC(A, x), y);
    718716
    719     TIMING_START (bi_factorize);
     717    TIMING_START (fac_bi_factorize);
    720718    bufBiFactors= ratBiSqrfFactorize (bufAeval.getFirst(), v);
    721     TIMING_END_AND_PRINT (bi_factorize,
     719    TIMING_END_AND_PRINT (fac_bi_factorize,
    722720                          "time for bivariate factorization: ");
    723721    bufBiFactors.removeFirst();
     
    997995    ExtensionInfo info= ExtensionInfo (false);
    998996    CFList liftedFactors;
    999     TIMING_START (hensel_lift);
     997    TIMING_START (fac_hensel_lift);
    1000998    liftedFactors= henselLiftAndEarly
    1001999                   (A, MOD, liftBounds, earlySuccess, earlyFactors,
    10021000                    Aeval, biFactors, evaluation, info);
    1003     TIMING_END_AND_PRINT (hensel_lift, "time for hensel lifting: ");
    1004 
    1005     TIMING_START (factor_recombination);
     1001    TIMING_END_AND_PRINT (fac_hensel_lift, "time for hensel lifting: ");
     1002
     1003    TIMING_START (fac_factor_recombination);
    10061004    factors= factorRecombination (A, liftedFactors, MOD);
    1007     TIMING_END_AND_PRINT (factor_recombination,
     1005    TIMING_END_AND_PRINT (fac_factor_recombination,
    10081006                          "time for factor recombination: ");
    10091007
  • factory/facFactorize.h

    r09afeb rb1d287  
    77 *
    88 * @author Martin Lee
    9  *
    10  * @internal @version \$Id$
    119 *
    1210 **/
  • factory/facFqBivar.cc

    r09afeb rb1d287  
    1313 *
    1414 * @author Martin Lee
    15  *
    16  * @internal @version \$Id$
    1715 *
    1816 **/
     
    13331331  Variable x= Variable (1);
    13341332  CanonicalForm yToL= power (y, liftBound);
     1333  if (factors.length() == 2)
     1334  {
     1335    CanonicalForm tmp1, tmp2, tmp3;
     1336    tmp1= factors.getFirst();
     1337    tmp2= factors.getLast();
     1338    tmp1 *= LC (F, x);
     1339    tmp1= mod (tmp1, yToL);
     1340    tmp1 /= content (tmp1, x);
     1341    tmp2 *= LC (F, x);
     1342    tmp2= mod (tmp2, yToL);
     1343    tmp2 /= content (tmp2, x);
     1344    tmp3 = tmp1*tmp2;
     1345    if (tmp3/Lc (tmp3) == F/Lc (F))
     1346    {
     1347      factorsFound++;
     1348      F= 1;
     1349      reconstructedFactors.append (tmp1);
     1350      reconstructedFactors.append (tmp2);
     1351      return;
     1352    }
     1353  }
    13351354  CanonicalForm quot, buf;
    13361355  CFListIterator iter;
     
    13881407  Variable y= Variable (2);
    13891408  Variable x= Variable (1);
     1409  CanonicalForm yToL= power (y, liftBound);
     1410  if (factors.length() == 2)
     1411  {
     1412    CanonicalForm tmp1, tmp2, tmp3;
     1413    tmp1= factors.getFirst();
     1414    tmp2= factors.getLast();
     1415    tmp1 *= LC (F, x);
     1416    tmp1= mod (tmp1, yToL);
     1417    tmp1 /= content (tmp1, x);
     1418    tmp2 *= LC (F, x);
     1419    tmp2= mod (tmp2, yToL);
     1420    tmp2 /= content (tmp2, x);
     1421    tmp3 = tmp1*tmp2;
     1422    if (tmp3/Lc (tmp3) == F/Lc (F))
     1423    {
     1424      factorsFound++;
     1425      F= 1;
     1426      reconstructedFactors.append (tmp1);
     1427      reconstructedFactors.append (tmp2);
     1428      return;
     1429    }
     1430  }
    13901431  CanonicalForm quot, buf;
    1391   CanonicalForm yToL= power (y, liftBound);
    13921432  CFListIterator iter;
    13931433  for (long i= 1; i <= N.NumCols(); i++)
     
    16821722  CanonicalForm delta= info.getDelta();
    16831723  CanonicalForm yToL= power (y, liftBound);
     1724  CFList source, dest;
     1725  if (factors.length() == 2)
     1726  {
     1727    CanonicalForm tmp1, tmp2, tmp3;
     1728    tmp1= factors.getFirst();
     1729    tmp2= factors.getLast();
     1730    tmp1 *= LC (F, x);
     1731    tmp1= mod (tmp1, yToL);
     1732    tmp1 /= content (tmp1, x);
     1733    tmp2 *= LC (F, x);
     1734    tmp2= mod (tmp2, yToL);
     1735    tmp2 /= content (tmp2, x);
     1736    tmp3 = tmp1*tmp2;
     1737    if (tmp3/Lc (tmp3) == F/Lc (F))
     1738    {
     1739      tmp1= tmp1 (y - evaluation, y);
     1740      tmp2= tmp2 (y - evaluation, y);
     1741      if (!k && beta == x && degree (tmp2, alpha) < 1 &&
     1742          degree (tmp1, alpha) < 1)
     1743      {
     1744        factorsFound++;
     1745        F= 1;
     1746        tmp1= mapDown (tmp1, info, source, dest);
     1747        tmp2= mapDown (tmp2, info, source, dest);
     1748        reconstructedFactors.append (tmp1);
     1749        reconstructedFactors.append (tmp2);
     1750        return;
     1751      }
     1752      else if (!isInExtension (tmp2, gamma, k, delta, source, dest) &&
     1753               !isInExtension (tmp1, gamma, k, delta, source, dest))
     1754      {
     1755        factorsFound++;
     1756        F= 1;
     1757        tmp1= mapDown (tmp1, info, source, dest);
     1758        tmp2= mapDown (tmp2, info, source, dest);
     1759        reconstructedFactors.append (tmp1);
     1760        reconstructedFactors.append (tmp2);
     1761        return;
     1762      }
     1763    }
     1764  }
    16841765  CanonicalForm quot, buf, buf2;
    1685   CFList source, dest;
    16861766  CFListIterator iter;
    16871767  for (long i= 1; i <= N.NumCols(); i++)
     
    41794259                               CanonicalForm& bufF, CFList& factors, int& l,
    41804260                               int& factorsFound, bool beenInThres, CFMatrix& M,
    4181                                CFArray& Pi, CFList& diophant
     4261                               CFArray& Pi, CFList& diophant, bool symmetric,
     4262                               const CanonicalForm& evaluation
    41824263                              )
    41834264{
     
    42494330    while ((degree (F,y)/4)*i + 4 <= smallFactorDeg)
    42504331      i++;
    4251     while (i < 4)
    4252     {
    4253       dummy= tmin (degree (F,y)+1, (degree (F,y)/4)*(i+1)+4);
     4332    while (i < 5)
     4333    {
     4334      dummy= tmin (degree (F,y)+1, (degree (F,y)/4)*i+4);
    42544335      if (l < dummy)
    42554336      {
     
    42574338        henselLiftResume12 (F, factors, l, dummy, Pi, diophant, M);
    42584339        l= dummy;
     4340        if (i == 1 && degree (F)%4==0 && symmetric && factors.length() == 2 &&
     4341            LC (F,1).inCoeffDomain() &&
     4342           (degree (factors.getFirst(), 1) == degree (factors.getLast(),1)))
     4343        {
     4344          Variable x= Variable (1);
     4345          CanonicalForm g, h, gg, hh, multiplier1, multiplier2, check1, check2;
     4346          int m= degree (F)/4+1;
     4347          g= factors.getFirst();
     4348          h= factors.getLast();
     4349          g= mod (g, power (y,m));
     4350          h= mod (h, power (y,m));
     4351          g= g (y-evaluation, y);
     4352          h= h (y-evaluation, y);
     4353          gg= mod (swapvar (g,x,y),power (x,m));
     4354          gg= gg (y + evaluation, y);
     4355          multiplier1= factors.getLast()[m-1][0]/gg[m-1][0];
     4356          gg= div (gg, power (y,m));
     4357          gg= gg*power (y,m);
     4358          hh= mod (swapvar (h,x,y),power (x,m));
     4359          hh= hh (y + evaluation, y);
     4360          multiplier2= factors.getFirst()[m-1][0]/hh[m-1][0];
     4361          hh= div (hh, power (y,m));
     4362          hh= hh*power (y,m);
     4363          gg= multiplier1*gg+mod (factors.getLast(), power (y,m));
     4364          hh= multiplier2*hh+mod (factors.getFirst(), power (y,m));
     4365          check1= gg (y-evaluation,y);
     4366          check2= hh (y-evaluation,y);
     4367          check1= swapvar (check1, x, y);
     4368          if (check1/Lc (check1) == check2/Lc (check2))
     4369          {
     4370            result.append (gg);
     4371            result.append (hh);
     4372            delete [] liftPre;
     4373            delete [] factorsFoundIndex;
     4374            return result;
     4375          }
     4376        }
    42594377      }
    42604378      else
    42614379      {
    42624380        i++;
    4263         if (i < 4)
     4381        if (i < 5)
    42644382          continue;
    42654383      }
     
    42864404                               CanonicalForm& bufF, CFList& factors, int& l,
    42874405                               int& factorsFound, bool beenInThres, CFMatrix& M,
    4288                                CFArray& Pi, CFList& diophant
     4406                               CFArray& Pi, CFList& diophant, bool symmetric,
     4407                               const CanonicalForm& evaluation
    42894408                              )
    42904409{
     
    43554474    while ((degree (F,y)/4)*i + 4 <= smallFactorDeg)
    43564475      i++;
    4357     while (i < 4)
    4358     {
    4359       dummy= tmin (degree (F,y)+1, (degree (F,y)/4)*(i+1)+4);
     4476    while (i < 5)
     4477    {
     4478      dummy= tmin (degree (F,y)+1, (degree (F,y)/4)*i+4);
    43604479      if (l < dummy)
    43614480      {
     
    43634482        henselLiftResume12 (F, factors, l, dummy, Pi, diophant, M);
    43644483        l= dummy;
     4484        if (i == 1 && degree (F)%4==0 && symmetric && factors.length() == 2 &&
     4485            LC (F,1).inCoeffDomain() &&
     4486           (degree (factors.getFirst(), 1) == degree (factors.getLast(),1)))
     4487        {
     4488          Variable x= Variable (1);
     4489          CanonicalForm g, h, gg, hh, multiplier1, multiplier2, check1, check2;
     4490          int m= degree (F)/4+1;
     4491          g= factors.getFirst();
     4492          h= factors.getLast();
     4493          g= mod (g, power (y,m));
     4494          h= mod (h, power (y,m));
     4495          g= g (y-evaluation, y);
     4496          h= h (y-evaluation, y);
     4497          gg= mod (swapvar (g,x,y),power (x,m));
     4498          gg= gg (y + evaluation, y);
     4499          multiplier1= factors.getLast()[m-1][0]/gg[m-1][0];
     4500          gg= div (gg, power (y,m));
     4501          gg= gg*power (y,m);
     4502          hh= mod (swapvar (h,x,y),power (x,m));
     4503          hh= hh (y + evaluation, y);
     4504          multiplier2= factors.getFirst()[m-1][0]/hh[m-1][0];
     4505          hh= div (hh, power (y,m));
     4506          hh= hh*power (y,m);
     4507          gg= multiplier1*gg+mod (factors.getLast(), power (y,m));
     4508          hh= multiplier2*hh+mod (factors.getFirst(), power (y,m));
     4509          check1= gg (y-evaluation,y);
     4510          check2= hh (y-evaluation,y);
     4511          check1= swapvar (check1, x, y);
     4512          if (check1/Lc (check1) == check2/Lc (check2))
     4513          {
     4514            result.append (gg);
     4515            result.append (hh);
     4516            delete [] liftPre;
     4517            delete [] factorsFoundIndex;
     4518            return result;
     4519          }
     4520        }
    43654521      }
    43664522      else
    43674523      {
    43684524        i++;
    4369         if (i < 4)
     4525        if (i < 5)
    43704526          continue;
    43714527      }
     
    44664622    while ((degree (F,y)/4)*i + 4 <= smallFactorDeg)
    44674623      i++;
    4468     while (i < 4)
    4469     {
    4470       dummy= tmin (degree (F,y)+1, (degree (F,y)/4)*(i+1)+4);
     4624    while (i < 5)
     4625    {
     4626      dummy= tmin (degree (F,y)+1, (degree (F,y)/4)*i+4);
    44714627      if (l < dummy)
    44724628      {
     
    44784634      {
    44794635        i++;
    4480         if (i < 4)
     4636        if (i < 5)
    44814637          continue;
    44824638      }
     
    45794735  }
    45804736  Variable y= F.mvar();
    4581   CanonicalForm shiftedF= G (y - evaluation, y);
    4582   int sizeOldF= size (shiftedF);
     4737  int sizeOldF= size (G);
    45834738  if (size (F) < sizeOldF)
    45844739  {
    4585     H= F (y + evaluation, y); //shift back to zero
     4740    H= F;
    45864741    success= true;
    45874742    return earlyFactors;
     
    45964751CFList
    45974752henselLiftAndLatticeRecombi (const CanonicalForm& G, const CFList& uniFactors,
    4598                              const Variable& alpha, const DegreePattern& degPat
     4753                             const Variable& alpha, const DegreePattern& degPat,
     4754                             bool symmetric, const CanonicalForm& evaluation
    45994755                            )
    46004756{
     
    46274783  CFList smallFactors;
    46284784  CanonicalForm H;
    4629   bool success;
     4785  bool success= false;
    46304786  smallFactors= sieveSmallFactors (F, bufUniFactors, degs, H, diophant, Pi, M,
    46314787                                   success, minBound + 1
     
    49265082    result= earlyReconstructionAndLifting (F, NTLN, bufF, bufUniFactors, l,
    49275083                                           factorsFound, beenInThres, M, Pi,
    4928                                            diophant
     5084                                           diophant, symmetric, evaluation
    49295085                                          );
    49305086
     
    49395095    result= earlyReconstructionAndLifting (F, NTLNe, bufF, bufUniFactors, l,
    49405096                                           factorsFound, beenInThres, M, Pi,
    4941                                            diophant
     5097                                           diophant, symmetric, evaluation
    49425098                                          );
    49435099
     
    50645220    }
    50655221    return Union (result, henselLiftAndLatticeRecombi (bufF, bufUniFactors,
    5066                                                        alpha, degs
     5222                                                       alpha, degs, symmetric,
     5223                                                       evaluation
    50675224                                                      )
    50685225                 );
     
    51945351    delete [] bounds;
    51955352    return Union (result, henselLiftAndLatticeRecombi (F, bufUniFactors, alpha,
    5196                                                        degs
     5353                                                       degs,symmetric, evaluation
    51975354                                                      )
    51985355                 );
     
    52815438  {
    52825439    delete [] bounds;
    5283     return CFList (F);
     5440    CFList source, dest;
     5441    CanonicalForm tmp= G (y - evaluation, y);
     5442    tmp= mapDown (tmp, info, source, dest);
     5443    return CFList (tmp);
    52845444  }
    52855445  int minBound= bounds[0];
     
    52995459  CFList smallFactors;
    53005460  CanonicalForm H;
    5301   bool success;
     5461  bool success= false;
    53025462  smallFactors= extSieveSmallFactors (F, bufUniFactors, degs, H, diophant, Pi,
    53035463                                      M, success, minBound + 1, evaluation, info
     
    58516011
    58526012  bool fail= false;
    5853   CanonicalForm Aeval, evaluation, bufAeval, bufEvaluation, buf;
     6013  CanonicalForm Aeval, evaluation, bufAeval, bufEvaluation, buf, tmp;
    58546014  CFList uniFactors, list, bufUniFactors;
    58556015  DegreePattern degs;
     
    58696029  int subCheck1= substituteCheck (A, x);
    58706030  int subCheck2= substituteCheck (A, y);
     6031  bool symmetric= false;
    58716032  for (int i= 0; i < factorNums; i++)
    58726033  {
    58736034    bufAeval= A;
    58746035    bufEvaluation= evalPoint (A, bufAeval, alpha, list, GF, fail);
    5875     if (!derivXZero && !fail2)
    5876     {
    5877       buf= swapvar (A, x, y);
     6036    if (!derivXZero && !fail2 && !symmetric)
     6037    {
     6038      if (i == 0)
     6039      {
     6040        buf= swapvar (A, x, y);
     6041        symmetric= (A/Lc (A) == buf/Lc (buf));
     6042      }
    58786043      bufAeval2= buf;
    58796044      bufEvaluation2= evalPoint (buf, bufAeval2, alpha, list2, GF, fail2);
     
    58826047    if (fail && (i == 0))
    58836048    {
    5884       if (!derivXZero && !fail2)
     6049      if (!derivXZero && !fail2 && !symmetric)
    58856050      {
    58866051        bufEvaluation= bufEvaluation2;
     
    58886053        subCheck2= subCheck1;
    58896054        subCheck1= dummy;
     6055        tmp= A;
    58906056        A= buf;
     6057        buf= tmp;
    58916058        bufAeval= bufAeval2;
    58926059        swap2= true;
     
    59206087              (prod (bufUniFactors)*Lc (bufAeval) == bufAeval));
    59216088
    5922     if (!derivXZero && !fail2)
     6089    if (!derivXZero && !fail2 && !symmetric)
    59236090    {
    59246091      TIMING_START (fac_fq_uni_factorizer);
     
    59316098
    59326099    if (bufUniFactors.length() == 1 ||
    5933         (!fail2 && !derivXZero && (bufUniFactors2.length() == 1)))
     6100        (!fail2 && !derivXZero && !symmetric && (bufUniFactors2.length() == 1)))
    59346101    {
    59356102      if (extension)
     
    59696136      }
    59706137
    5971       if (!derivXZero && !fail2 && subCheck2 > 0)
     6138      if (!derivXZero && !fail2 && !symmetric && subCheck2 > 0)
    59726139      {
    59736140        int subCheck= substituteCheck (bufUniFactors2);
     
    59896156    // degree analysis
    59906157    bufDegs = DegreePattern (bufUniFactors);
    5991     if (!derivXZero && !fail2)
     6158    if (!derivXZero && !fail2 && !symmetric)
    59926159      bufDegs2= DegreePattern (bufUniFactors2);
    59936160
     
    59986165      uniFactors= bufUniFactors;
    59996166      degs= bufDegs;
    6000       if (!derivXZero && !fail2)
     6167      if (!derivXZero && !fail2 && !symmetric)
    60016168      {
    60026169        Aeval2= bufAeval2;
     
    60096176    {
    60106177      degs.intersect (bufDegs);
    6011       if (!derivXZero && !fail2)
     6178      if (!derivXZero && !fail2 && !symmetric)
    60126179      {
    60136180        degs2.intersect (bufDegs2);
     
    60276194    }
    60286195    list.append (bufEvaluation);
    6029     if (!derivXZero && !fail2)
     6196    if (!derivXZero && !fail2 && !symmetric)
    60306197      list2.append (bufEvaluation2);
    60316198  }
    60326199
    6033   if (!derivXZero && !fail2)
     6200  if (!derivXZero && !fail2 && !symmetric)
    60346201  {
    60356202    if (uniFactors.length() > uniFactors2.length() ||
     
    61186285    else if (alpha.level() == 1 && !GF)
    61196286    {
    6120       CFList lll= henselLiftAndLatticeRecombi (A, uniFactors, alpha, degs);
     6287      CFList lll= henselLiftAndLatticeRecombi (A, uniFactors, alpha, degs,
     6288                                               symmetric, evaluation);
    61216289      factors= Union (lll, factors);
    61226290    }
    61236291    else if (!extension && (alpha != x || GF))
    61246292    {
    6125       CFList lll= henselLiftAndLatticeRecombi (A, uniFactors, alpha, degs);
     6293      CFList lll= henselLiftAndLatticeRecombi (A, uniFactors, alpha, degs,
     6294                                               symmetric, evaluation);
    61266295      factors= Union (lll, factors);
    61276296    }
  • factory/facFqBivar.h

    r09afeb rb1d287  
    88 *
    99 * @author Martin Lee
    10  *
    11  * @internal @version \$Id$
    1210 *
    1311 **/
     
    263261  decompress (contentXFactors, N);
    264262  decompress (contentYFactors, N);
    265   CFFList result, resultRoot;
     263  CFFList result;
    266264  if (F.inCoeffDomain())
    267265  {
     
    274272  vec_ZZ S;
    275273  F= compress (F, M, S);
    276   CanonicalForm pthRoot, A;
    277   CanonicalForm sqrfP= sqrfPart (F/Lc(F), pthRoot, info.getAlpha());
    278   CFList buf, bufRoot;
    279   int p= getCharacteristic();
    280   int l;
    281   if (degree (pthRoot) > 0)
    282   {
    283     pthRoot= maxpthRoot (pthRoot, p, l);
    284     result= FpBiFactorize (pthRoot, false);
    285     result.removeFirst();
    286     for (CFFListIterator i= result; i.hasItem(); i++)
    287       i.getItem()= CFFactor (N (decompress (i.getItem().factor(), M, S)),
    288                              i.getItem().exp()*ipower (p,l));
    289     result= Union (result, contentXFactors);
    290     result= Union (result, contentYFactors);
    291     normalize (result);
    292     result.insert (CFFactor (LcF, 1));
    293     return result;
    294   }
    295   else
    296   {
    297     buf= biFactorize (sqrfP, info);
    298     A= F/LcF;
    299     result= multiplicity (A, buf);
    300     for (CFFListIterator i= result; i.hasItem(); i++)
    301       i.getItem()= CFFactor (N (decompress (i.getItem().factor(), M, S)),
    302                              i.getItem().exp());
    303   }
    304   if (degree (A) > 0)
    305   {
    306     resultRoot= FpBiFactorize (A, false);
    307     resultRoot.removeFirst();
    308     for (CFFListIterator i= resultRoot; i.hasItem(); i++)
    309       i.getItem()= CFFactor (N (decompress (i.getItem().factor(), M, S)),
    310                              i.getItem().exp());
    311     result= Union (result, resultRoot);
    312   }
     274
     275  CFFList sqrf= FpSqrf (F, false);
     276  CFList bufResult;
     277  sqrf.removeFirst();
     278  CFListIterator i;
     279  for (CFFListIterator iter= sqrf; iter.hasItem(); iter++)
     280  {
     281    bufResult= biFactorize (iter.getItem().factor(), info);
     282    for (i= bufResult; i.hasItem(); i++)
     283      result.append (CFFactor (N (decompress (i.getItem(), M, S)),
     284                               iter.getItem().exp()));
     285  }
     286
    313287  result= Union (result, contentXFactors);
    314288  result= Union (result, contentYFactors);
     
    388362  decompress (contentXFactors, N);
    389363  decompress (contentYFactors, N);
    390   CFFList result, resultRoot;
     364  CFFList result;
    391365  if (F.inCoeffDomain())
    392366  {
     
    399373  vec_ZZ S;
    400374  F= compress (F, M, S);
    401   CanonicalForm pthRoot, A, tmp;
    402   CanonicalForm sqrfP= sqrfPart (F/Lc(F), pthRoot, alpha);
    403   CFList buf, bufRoot;
    404   int p= getCharacteristic();
    405   int q= ipower (p, degree (getMipo (alpha)));
    406   int l;
    407   if (degree (pthRoot) > 0)
    408   {
    409     pthRoot= maxpthRoot (pthRoot, q, l);
    410     result= FqBiFactorize (pthRoot, alpha, false);
    411     result.removeFirst();
    412     for (CFFListIterator i= result; i.hasItem(); i++)
    413       i.getItem()= CFFactor (N (decompress (i.getItem().factor(), M, S)),
    414                              i.getItem().exp()*ipower (p,l));
    415     result= Union (result, contentXFactors);
    416     result= Union (result, contentYFactors);
    417     normalize (result);
    418     result.insert (CFFactor (LcF, 1));
    419     return result;
    420   }
    421   else
    422   {
    423     buf= biFactorize (sqrfP, info);
    424     A= F/LcF;
    425     result= multiplicity (A, buf);
    426     for (CFFListIterator i= result; i.hasItem(); i++)
    427       i.getItem()= CFFactor (N (decompress (i.getItem().factor(), M, S)),
    428                              i.getItem().exp());
    429   }
    430   if (degree (A) > 0)
    431   {
    432     resultRoot= FqBiFactorize (A, alpha, false);
    433     resultRoot.removeFirst();
    434     for (CFFListIterator i= resultRoot; i.hasItem(); i++)
    435       i.getItem()= CFFactor (N (decompress (i.getItem().factor(), M, S)),
    436                              i.getItem().exp());
    437     result= Union (result, resultRoot);
    438   }
     375
     376  CFFList sqrf= FqSqrf (F, alpha, false);
     377  CFList bufResult;
     378  sqrf.removeFirst();
     379  CFListIterator i;
     380  for (CFFListIterator iter= sqrf; iter.hasItem(); iter++)
     381  {
     382    bufResult= biFactorize (iter.getItem().factor(), info);
     383    for (i= bufResult; i.hasItem(); i++)
     384      result.append (CFFactor (N (decompress (i.getItem(), M, S)),
     385                               iter.getItem().exp()));
     386  }
     387
    439388  result= Union (result, contentXFactors);
    440389  result= Union (result, contentYFactors);
     
    515464  decompress (contentXFactors, N);
    516465  decompress (contentYFactors, N);
    517   CFFList result, resultRoot;
     466  CFFList result;
    518467  if (F.inCoeffDomain())
    519468  {
     
    526475  vec_ZZ S;
    527476  F= compress (F, M, S);
    528   CanonicalForm pthRoot, A;
    529   CanonicalForm sqrfP= sqrfPart (F/LcF, pthRoot, info.getAlpha());
    530   CFList buf;
    531   int p= getCharacteristic();
    532   int q= ipower (p, getGFDegree());
    533   int l;
    534   if (degree (pthRoot) > 0)
    535   {
    536     pthRoot= maxpthRoot (pthRoot, q, l);
    537     result= GFBiFactorize (pthRoot, false);
    538     result.removeFirst();
    539     for (CFFListIterator i= result; i.hasItem(); i++)
    540       i.getItem()= CFFactor (N (decompress (i.getItem().factor(), M, S)),
    541                              i.getItem().exp()*ipower (p,l));
    542     result= Union (result, contentXFactors);
    543     result= Union (result, contentYFactors);
    544     normalize (result);
    545     result.insert (CFFactor (LcF, 1));
    546     return result;
    547   }
    548   else
    549   {
    550     buf= biFactorize (sqrfP, info);
    551     A= F/LcF;
    552     result= multiplicity (A, buf);
    553     for (CFFListIterator i= result; i.hasItem(); i++)
    554       i.getItem()= CFFactor (N (decompress (i.getItem().factor(), M, S)),
    555                              i.getItem().exp());
    556   }
    557   if (degree (A) > 0)
    558   {
    559     resultRoot= GFBiFactorize (A, false);
    560     resultRoot.removeFirst();
    561     for (CFFListIterator i= resultRoot; i.hasItem(); i++)
    562       i.getItem()= CFFactor (N (decompress (i.getItem().factor(), M, S)),
    563                              i.getItem().exp());
    564     result= Union (result, resultRoot);
    565   }
     477
     478  CFFList sqrf= GFSqrf (F, false);
     479  CFList bufResult;
     480  sqrf.removeFirst();
     481  CFListIterator i;
     482  for (CFFListIterator iter= sqrf; iter.hasItem(); iter++)
     483  {
     484    bufResult= biFactorize (iter.getItem().factor(), info);
     485    for (i= bufResult; i.hasItem(); i++)
     486      result.append (CFFactor (N (decompress (i.getItem(), M, S)),
     487                               iter.getItem().exp()));
     488  }
     489
    566490  result= Union (result, contentXFactors);
    567491  result= Union (result, contentYFactors);
  • factory/facFqBivarUtil.cc

    r09afeb rb1d287  
    77 *
    88 * @author Martin Lee
    9  *
    10  * @internal @version \$Id$
    119 *
    1210 **/
  • factory/facFqBivarUtil.h

    r09afeb rb1d287  
    77 *
    88 * @author Martin Lee
    9  *
    10  * @internal @version \$Id$
    119 *
    1210 **/
  • factory/facFqFactorize.cc

    r09afeb rb1d287  
    1212 *
    1313 * @author Martin Lee
    14  *
    15  * @internal @version \$Id$
    1614 *
    1715 **/
  • factory/facFqFactorize.h

    r09afeb rb1d287  
    88 *
    99 * @author Martin Lee
    10  *
    11  * @internal @version \$Id$
    1210 *
    1311 **/
  • factory/facFqFactorizeUtil.cc

    r09afeb rb1d287  
    77 *
    88 * @author Martin Lee
    9  *
    10  * @internal @version \$Id$
    119 *
    1210 **/
  • factory/facFqFactorizeUtil.h

    r09afeb rb1d287  
    77 *
    88 * @author Martin Lee
    9  *
    10  * @internal @version \$Id$
    119 *
    1210 **/
  • factory/facFqSquarefree.cc

    r09afeb rb1d287  
    99 *
    1010 * @author Martin Lee
    11  *
    12  * @internal @version \$Id$
    1311 *
    1412 **/
  • factory/facFqSquarefree.h

    r09afeb rb1d287  
    88 *
    99 * @author Martin Lee
    10  *
    11  * @internal @version \$Id$
    1210 *
    1311 **/
  • factory/facHensel.cc

    r09afeb rb1d287  
    1313 *
    1414 * @author Martin Lee
    15  *
    16  * @internal @version \$Id$
    1715 *
    1816 **/
  • factory/facHensel.h

    r09afeb rb1d287  
    1010 *
    1111 * @author Martin Lee
    12  *
    13  * @internal @version \$Id$
    1412 *
    1513 **/
  • factory/facIrredTest.cc

    r09afeb rb1d287  
    88 *
    99 * @author Martin Lee
    10  *
    11  * @internal @version \$Id$
    1210 *
    1311 **/
  • factory/facIrredTest.h

    r09afeb rb1d287  
    1111 *
    1212 * @author Martin Lee
    13  *
    14  * @internal @version \$Id$
    1513 *
    1614 **/
  • factory/facMul.cc

    r09afeb rb1d287  
    13481348                    CanonicalForm& M)
    13491349{
    1350   int d1= tmax (degree (F, 1), degree (G, 1)) + 1;
     1350  int d1= degree (F, 1) + degree (G, 1) + 1;
    13511351  d1 /= 2;
    13521352  d1 += 1;
     
    14171417                    CanonicalForm& M)
    14181418{
    1419   int d1= tmax (degree (F, 1), degree (G, 1)) + 1;
     1419  int d1= degree (F, 1) + degree (G, 1) + 1;
    14201420  d1 /= 2;
    14211421  d1 += 1;
     
    24352435    else
    24362436    {
     2437      bool zz_pEbak= zz_pE::initialized();
     2438      zz_pEBak bak;
     2439      if (zz_pEbak)
     2440        bak.save();
    24372441      zz_pX mipo= convertFacCF2NTLzzpX (M);
    24382442      Variable y= Variable (2);
     
    24422446      div (NTLA, NTLA, NTLB);
    24432447      Q= convertNTLzz_pEX2CF (NTLA, x, y);
     2448      if (zz_pEbak)
     2449        bak.restore();
    24442450    }
    24452451  }
  • factory/facSparseHensel.cc

    r09afeb rb1d287  
    1010 *
    1111 * @author Martin Lee
    12  *
    13  * @internal @version \$Id$
    1412 *
    1513 **/
  • factory/facSparseHensel.h

    r09afeb rb1d287  
    77 *
    88 * @author Martin Lee
    9  *
    10  * @internal @version \$Id$
    119 *
    1210 **/
  • factory/fac_berlekamp.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/fac_berlekamp.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_FAC_BERLEKAMP_H
  • factory/fac_cantzass.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/fac_cantzass.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_FAC_CANTZASS_H
  • factory/fac_distrib.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/fac_distrib.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_FAC_DISTRIB_H
  • factory/fac_iterfor.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/fac_iterfor.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_FAC_ITERFOR_H
  • factory/fac_multihensel.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/fac_multivar.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/fac_multivar.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_FAC_MULTIVAR_H
  • factory/fac_sqrfree.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/fac_sqrfree.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_FAC_SQRFREE_H
  • factory/fac_univar.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/fac_univar.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_FAC_UNIVAR_H
  • factory/fac_util.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/fac_util.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_FAC_UTIL_H
  • factory/factory.cfg

    r09afeb rb1d287  
    1 # $Id$
    2 
    31#
    42# factory.cfg - doxygen documentation file.
  • factory/factory.template

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_FACTORY_H
  • factory/factoryconf.template

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_FACTORYCONF_H
  • factory/ffops.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/ffops.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_FFOPS_H
  • factory/ftmpl_inst.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/gengftables-conway.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/gengftables.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/gf_tabutil.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/gf_tabutil.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_GF_TABUTIL_H
  • factory/gfops.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/gfops.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_GFOPS_H
  • factory/gmpext.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_GMPEXT_H
  • factory/imm.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/imm.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_IMM_H
  • factory/include/factory/templates/ftmpl_array.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_ARRAY_H
  • factory/include/factory/templates/ftmpl_factor.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_FACTOR_H
  • factory/include/factory/templates/ftmpl_list.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_LIST_H
  • factory/include/factory/templates/ftmpl_matrix.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_MATRIX_H
  • factory/int_cf.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/int_cf.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_INT_CF_H
  • factory/int_int.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/int_int.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_INT_INT_H
  • factory/int_intdiv.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/int_poly.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/int_poly.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_INT_POLY_H
  • factory/int_pp.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/int_pp.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_INT_PP_H
  • factory/int_rat.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/int_rat.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_INT_RAT_H
  • factory/parseutil.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/parseutil.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_PARSEUTIL_H
  • factory/readcf.yy

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43%{
  • factory/singext.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/singext.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_SINGEXT_H
  • factory/templates/ftmpl_array.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include <factory/templates/ftmpl_array.h>
  • factory/templates/ftmpl_factor.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include <factory/templates/ftmpl_factor.h>
  • factory/templates/ftmpl_functions.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_FUNCTIONS_H
  • factory/templates/ftmpl_list.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include <factory/templates/ftmpl_list.h>
  • factory/templates/ftmpl_matrix.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include <factory/templates/ftmpl_matrix.h>
  • factory/test_install.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/timing.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43/* It should be possible to include this file multiple times for different */
  • factory/var_intglobal.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43//{{{ docu
  • factory/var_intglobal.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_VAR_INTGLOBAL_H
  • factory/variable.cc

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#include "config.h"
  • factory/variable.h

    r09afeb rb1d287  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id$ */
    32
    43#ifndef INCL_VARIABLE_H
  • libpolys/polys/clapconv.cc

    r09afeb rb1d287  
    121121  int off=rPar(r);
    122122
    123   On(SW_RATIONAL);
     123  if (!rField_is_Zp_a(r))
     124    On(SW_RATIONAL);
    124125  while ( p!=NULL)
    125126  {
Note: See TracChangeset for help on using the changeset viewer.