Changeset db1996e in git


Ignore:
Timestamp:
Feb 1, 2006, 10:37:07 AM (18 years ago)
Author:
Wilfred Pohl <pohl@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
a9d8e7ac2c2fe540467854824084dc43a02f3b7e
Parents:
893092105917f42eaa276e64daa72cd47ebaccce
Message:
bugfix


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

Legend:

Unmodified
Added
Removed
  • factory/cf_gcd.cc

    r8930921 rdb1996e  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: cf_gcd.cc,v 1.37 2006-01-31 09:42:23 pohl Exp $ */
     2/* $Id: cf_gcd.cc,v 1.38 2006-02-01 09:37:07 pohl Exp $ */
    33
    44#include <config.h>
     
    2525
    2626static CanonicalForm gcd_poly( const CanonicalForm & f, const CanonicalForm& g, bool modularflag );
     27static CanonicalForm cf_content ( const CanonicalForm & f, const CanonicalForm & g );
    2728
    2829bool
     
    430431            CFMap M, N;
    431432            compress( f, g, M, N );
    432             return N( gcd_poly1( M(f), M(g), false ) );
     433            CanonicalForm fM = M(f);
     434            CanonicalForm gM = M(g);
     435            if ( fM.mvar() != gM.mvar() ) {
     436                if ( fM.mvar() > gM.mvar() )
     437                    return N( cf_content( fM, gM ) );
     438                else
     439                    return N( cf_content( gM, fM ) );
     440            }
     441            else
     442                return N( gcd_poly1( fM, gM, false ) );
    433443        }
    434444        else
Note: See TracChangeset for help on using the changeset viewer.