Changeset ebc602 in git


Ignore:
Timestamp:
May 16, 2006, 3:43:19 PM (18 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
dbcf42a937f51948f4de74902429b68c1b54592b
Parents:
b8b01af0e7839f5203fa9378d74dad8732160032
Message:
*hannes: gcc 4.1 fix: divies ->fdivides


git-svn-id: file:///usr/local/Singular/svn/trunk@9140 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
factory
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_algorithm.cc

    rb8b01a rebc602  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: cf_algorithm.cc,v 1.10 2005-12-09 08:35:37 Singular Exp $ */
     2/* $Id: cf_algorithm.cc,v 1.11 2006-05-16 13:43:18 Singular Exp $ */
    33
    44//{{{ docu
     
    293293//}}}
    294294
    295 //{{{ bool divides ( const CanonicalForm & f, const CanonicalForm & g )
    296 //{{{ docu
    297 //
    298 // divides() - check whether `f' divides `g'.
     295//{{{ bool fdivides ( const CanonicalForm & f, const CanonicalForm & g )
     296//{{{ docu
     297//
     298// fdivides() - check whether `f' divides `g'.
    299299//
    300300// Returns true iff `f' divides `g'.  Uses some extra heuristic
     
    315315// Developers note:
    316316// ----------------
    317 // One may consider the the test `divides( f.LC(), g.LC() )' in
     317// One may consider the the test `fdivides( f.LC(), g.LC() )' in
    318318// the main `if'-test superfluous since `divremt()' in the
    319319// `if'-body repeats the test.  However, `divremt()' does not use
    320320// any heuristic to do so.
    321321//
    322 // It seems not reasonable to call `divides()' from `divremt()'
    323 // to check divisibility of leading coefficients.  `divides()' is
     322// It seems not reasonable to call `fdivides()' from `divremt()'
     323// to check divisibility of leading coefficients.  `fdivides()' is
    324324// on a relatively high level compared to `divremt()'.
    325325//
    326326//}}}
    327327bool
    328 divides ( const CanonicalForm & f, const CanonicalForm & g )
     328fdivides ( const CanonicalForm & f, const CanonicalForm & g )
    329329{
    330330    // trivial cases
     
    351351        // f and g are polynomials in the same main variable
    352352        if ( degree( f ) <= degree( g )
    353              && divides( f.tailcoeff(), g.tailcoeff() )
    354              && divides( f.LC(), g.LC() ) ) {
     353             && fdivides( f.tailcoeff(), g.tailcoeff() )
     354             && fdivides( f.LC(), g.LC() ) ) {
    355355            CanonicalForm q, r;
    356356            return divremt( g, f, q, r ) && r.isZero();
  • factory/cf_algorithm.h

    rb8b01a rebc602  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: cf_algorithm.h,v 1.13 2006-05-15 08:17:36 Singular Exp $ */
     2/* $Id: cf_algorithm.h,v 1.14 2006-05-16 13:43:18 Singular Exp $ */
    33
    44#ifndef INCL_CF_ALGORITHM_H
     
    4040CanonicalForm bCommonDen ( const CanonicalForm & f );
    4141
    42 bool divides ( const CanonicalForm & f, const CanonicalForm & g );
     42bool fdivides ( const CanonicalForm & f, const CanonicalForm & g );
    4343
    4444CanonicalForm maxNorm ( const CanonicalForm & f );
  • factory/cf_gcd.cc

    rb8b01a rebc602  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: cf_gcd.cc,v 1.46 2006-05-08 12:24:04 pohl Exp $ */
     2/* $Id: cf_gcd.cc,v 1.47 2006-05-16 13:43:18 Singular Exp $ */
    33
    44#include <config.h>
     
    270270      // now balance D mod q
    271271      D = pp( balance( D, q ) );
    272       if ( divides( D, f ) && divides( D, g ) )
     272      if ( fdivides( D, f ) && fdivides( D, g ) )
    273273        return D * c;
    274274      else
     
    620620        else
    621621        {
    622             if ( divides( f, g ) )
     622            if ( fdivides( f, g ) )
    623623                return abs( f );
    624             else  if ( divides( g, f ) )
     624            else  if ( fdivides( g, f ) )
    625625                return abs( g );
    626626            if ( !( getCharacteristic() == 0 && isOn( SW_RATIONAL ) ) )
     
    628628                CanonicalForm d;
    629629                do{ d = gcd_poly( f, g ); }
    630                 while ((!divides(d,f)) || (!divides(d,g)));
     630                while ((!fdivides(d,f)) || (!fdivides(d,g)));
    631631                return abs( d );
    632632            }
     
    641641                Off( SW_RATIONAL );
    642642                do { l = gcd_poly( F, G ); }
    643                 while ((!divides(l,F)) || (!divides(l,G)));
     643                while ((!fdivides(l,F)) || (!fdivides(l,G)));
    644644                On( SW_RATIONAL );
    645645                return abs( l );
  • factory/fac_distrib.cc

    rb8b01a rebc602  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: fac_distrib.cc,v 1.7 2002-10-10 17:43:40 Singular Exp $ */
     2/* $Id: fac_distrib.cc,v 1.8 2006-05-16 13:43:18 Singular Exp $ */
    33
    44#include <config.h>
     
    7979            ut = lc( G[j] );
    8080            DEBOUTLN( cerr, "checking with " << ut );
    81             while ( m > 0 && divides( D[i], ut ) ) {
     81            while ( m > 0 && fdivides( D[i], ut ) ) {
    8282                DEBOUTLN( cerr, "match found" );
    8383                m--; ut /= D[i];
     
    129129            continue;
    130130        }
    131         while ( divides( h, f ) )
     131        while ( fdivides( h, f ) )
    132132            f /= h;
    133133        CFList D( h );
  • factory/fac_ezgcd.cc

    rb8b01a rebc602  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: fac_ezgcd.cc,v 1.26 2006-01-30 09:06:18 pohl Exp $ */
     2/* $Id: fac_ezgcd.cc,v 1.27 2006-05-16 13:43:18 Singular Exp $ */
    33
    44#include <config.h>
     
    110110        DEBOUTLN( cerr, "now after A4, delta = " << delta );
    111111        /// ---> A5
    112         if ( degF <= degG && delta == degF && divides( F, G ) )
     112        if ( degF <= degG && delta == degF && fdivides( F, G ) )
    113113        {
    114114            DEBDECLEVEL( cerr, "ezgcd" );
    115115            return d*F;
    116116        }
    117         if ( degG < degF && delta == degG && divides( G, F ) )
     117        if ( degG < degF && delta == degG && fdivides( G, F ) )
    118118        {
    119119            DEBDECLEVEL( cerr, "ezgcd" );
     
    183183              CanonicalForm cand=DD[2] / xxx; //content(DD[2],Variable(1));
    184184#if 0
    185               gcdfound= divides(cand,G) &&  divides(cand,F);
     185              gcdfound= fdivides(cand,G) &&  fdivides(cand,F);
    186186#else
    187187              if (B_is_F /*B==F*lcF*/)
    188188              {
    189189                DEBOUTLN( cerr, "(test) G: "<<G<<" % gcd:"<<cand<<" -> " << G%cand );
    190                 gcdfound= divides(cand,G);
     190                gcdfound= fdivides(cand,G);
    191191              }
    192192              else
    193193              {
    194194                DEBOUTLN( cerr, "(test) F: "<<F<<" % gcd:"<<cand<<" -> " << F%cand);
    195                 gcdfound= divides(cand,F);
     195                gcdfound= fdivides(cand,F);
    196196              }
    197197#endif
  • factory/sm_sparsemod.cc

    rb8b01a rebc602  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: sm_sparsemod.cc,v 1.8 2000-04-05 10:03:09 Singular Exp $ */
     2/* $Id: sm_sparsemod.cc,v 1.9 2006-05-16 13:43:19 Singular Exp $ */
    33
    44//{{{ docu
     
    454454      //cout << " lcggt = " << lcggt << endl;
    455455      //bool ja;
    456       //ja = divides( lcggt, lc( G[levU] ) );
     456      //ja = fdivides( lcggt, lc( G[levU] ) );
    457457      //cout << " ja = " << ja << endl;
    458458      //cout << " vor Verlassen " << endl;
     
    537537        res = result;
    538538
    539       if ( divides( res, primif ) && divides( res, primig ) )
     539      if ( fdivides( res, primif ) && fdivides( res, primig ) )
    540540        return  N(NN(res))*N(ggt) ;     /// compress rueckgaengig machen!
    541541      else
     
    587587          res = result;
    588588
    589         if ( ( divides( res, primif )) && ( divides ( res, primig ) ))
     589        if ( ( fdivides( res, primif )) && ( fdivides ( res, primig ) ))
    590590        {
    591591          // make monic ////
Note: See TracChangeset for help on using the changeset viewer.