Changeset fda36e in git


Ignore:
Timestamp:
May 8, 2006, 2:24:04 PM (17 years ago)
Author:
Wilfred Pohl <pohl@…>
Branches:
(u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
Children:
fa98a4f5c478760aa9bbf122228fe2c21c16173c
Parents:
8492cb96ea713816ff1376eb6195c8eaa8b76c45
Message:
NTL like Singular


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

Legend:

Unmodified
Added
Removed
  • factory/cf_gcd.cc

    r8492cb9 rfda36e  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: cf_gcd.cc,v 1.45 2006-04-27 14:32:57 Singular Exp $ */
     2/* $Id: cf_gcd.cc,v 1.46 2006-05-08 12:24:04 pohl Exp $ */
    33
    44#include <config.h>
     
    286286    CanonicalForm pi, pi1;
    287287    CanonicalForm C, Ci, Ci1, Hi, bi, pi2;
     288    bool bpure;
    288289    int delta = degree( f ) - degree( g );
    289290
     
    301302    if ( !( pi.isUnivariate() && pi1.isUnivariate() ) )
    302303    {
    303       if ( gcd_test_one( pi1, pi, true ) )
    304         return C;
    305     }
     304        if ( gcd_test_one( pi1, pi, true ) )
     305            return C;
     306        bpure = false;
     307     
     308    }
     309    else
     310    {
     311        bpure = isPurePoly(pi) && isPurePoly(pi1);
    306312#ifdef HAVE_NTL
    307     else
    308     {
    309       if ( isOn(SW_USE_NTL_GCD_P) && isPurePoly(pi) && isPurePoly(pi1) )
    310         return gcd_univar_ntlp(pi, pi1 ) * C;
    311     }
     313        if ( isOn(SW_USE_NTL_GCD_P) && bpure )
     314            return gcd_univar_ntlp(pi, pi1 ) * C;
    312315#endif
     316    }
    313317    Variable v = f.mvar();
    314318    Hi = power( LC( pi1, v ), delta );
     
    332336    if ( degree( pi1, v ) == 0 )
    333337        return C;
    334     else
    335         return C * pp( pi );
     338    pi /= content( pi );
     339    if ( bpure )
     340        pi /= pi.lc();
     341    return C * pi;
    336342}
    337343
Note: See TracChangeset for help on using the changeset viewer.