Changeset ee586a in git


Ignore:
Timestamp:
Jun 1, 2008, 7:49:05 PM (16 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
f2b58394b7c0b28984794adfcef85f56f72e35bf
Parents:
0b85fcff1722325fd8010e4185d911f83cd46c04
Message:
*hannes: sqrfree etc


git-svn-id: file:///usr/local/Singular/svn/trunk@10737 2c84dea3-7e68-4137-9b89-c4e89433aadc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • factory/fac_sqrfree.cc

    r0b85fc ree586a  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: fac_sqrfree.cc,v 1.11 2008-05-31 17:21:11 Singular Exp $ */
     2/* $Id: fac_sqrfree.cc,v 1.12 2008-06-01 17:49:05 Singular Exp $ */
    33
    44#include <config.h>
     
    115115    CFFList F;
    116116
    117     while ( ! c.degree() == 0 ) {
     117    while ( ! c.degree() == 0 )
     118    {
    118119        y = gcd( w, c ); z = w / y;
    119120        if ( degree( z ) > 0 )
     
    145146    CFFList F;
    146147    Variable v = aa.mvar();
    147     while ( ! c.degree(v) == 0 ) {
     148    while ( ! c.degree(v) == 0 )
     149    {
    148150        y = gcd( w, c ); z = w / y;
    149151        if ( degree( z, v ) > 0 )
     
    162164    if ( ! cont.isOne() )
    163165        F = Union( F, sqrFreeZ( cont ) );
    164     if ( lc( a ).sign() < 0 ) {
    165         if ( F.getFirst().exp() == 1 ) {
     166    if ( lc( a ).sign() < 0 )
     167    {
     168        if ( F.getFirst().exp() == 1 )
     169        {
    166170            CanonicalForm f = F.getFirst().factor();
    167171            CFFListIterator(F).getItem() = CFFactor( -f, 1 );
  • libfac/charset/charset.cc

    r0b85fc ree586a  
    22////////////////////////////////////////////////////////////
    33// emacs edit mode for this file is -*- C++ -*-
    4 /* $Id: charset.cc,v 1.15 2008-05-31 17:20:10 Singular Exp $ */
     4/* $Id: charset.cc,v 1.16 2008-06-01 17:48:13 Singular Exp $ */
    55/////////////////////////////////////////////////////////////
    66// FACTORY - Includes
     
    547547    if ( degree(elem) > 1 ) // linear poly's are irreduzible
    548548    {
    549       //qs = Factorize2(elem,CanonicalForm(0));
    550549      qs = Factorize(elem);
    551550      // remove a constant
     
    587586        {  // search for a non linear elem
    588587          elem=i.getItem();
    589           if (as.length()==1)
    590             qs = Factorize2(elem,as.getFirst());
    591           else
     588          //if (as.length()==1)
     589          //  qs = Factorize2(elem,as.getFirst());
     590          //else
    592591            qs= newfactoras(elem,as,success);
    593592          if ( qs.length() > 1 || qs.getFirst().exp() > 1 )
     
    609608/*
    610609$Log: not supported by cvs2svn $
     610Revision 1.15  2008/05/31 17:20:10  Singular
     611hannes: minor irras changes
     612
    611613Revision 1.14  2008/04/08 16:19:09  Singular
    612614*hannes: removed rcsid
  • libfac/factor/Factor.cc

    r0b85fc ree586a  
    11/* Copyright 1996 Michael Messollen. All rights reserved. */
    22///////////////////////////////////////////////////////////////////////////////
    3 /* $Id: Factor.cc,v 1.46 2008-05-31 17:20:10 Singular Exp $ */
     3/* $Id: Factor.cc,v 1.47 2008-06-01 17:48:14 Singular Exp $ */
    44static const char * errmsg = "\nYou found a bug!\nPlease inform singular@mathematik.uni-kl.de\nPlease include above information and your input (the ideal/polynomial and characteristic) in your bug-report.\nThank you.";
    55///////////////////////////////////////////////////////////////////////////////
     
    880880CFFList Factorize(const CanonicalForm & F, int is_SqrFree )
    881881{
    882   out_cf("Factorize ",F,"\n");
     882  //out_cf("Factorize ",F,"\n");
    883883  CFFList Outputlist,SqrFreeList,Intermediatelist,Outputlist2;
    884884  ListIterator<CFFactor> i,j;
     
    954954      if ( g.isUnivariate() )
    955955      {
    956         out_cf("univ. poly: ",g,"\n");
     956        //out_cf("univ. poly: ",g,"\n");
    957957        Intermediatelist=factorize(g,1); // poly is sqr-free!
    958958        for ( j=Intermediatelist; j.hasItem(); j++ )
     
    13351335/*
    13361336$Log: not supported by cvs2svn $
     1337Revision 1.46  2008/05/31 17:20:10  Singular
     1338hannes: minor irras changes
     1339
    13371340Revision 1.45  2008/04/08 16:19:10  Singular
    13381341*hannes: removed rcsid
  • libfac/factor/SqrFree.cc

    r0b85fc ree586a  
    22///////////////////////////////////////////////////////////////////////////////
    33// emacs edit mode for this file is -*- C++ -*-
    4 /* $Id: SqrFree.cc,v 1.21 2008-05-31 17:20:10 Singular Exp $ */
     4/* $Id: SqrFree.cc,v 1.22 2008-06-01 17:48:14 Singular Exp $ */
    55static const char * errmsg = "\nYou found a bug!\nPlease inform singular@mathematik.uni-kl.de\n Please include above information and your input (the ideal/polynomial and characteristic) in your bug-report.\nThank you.";
    66///////////////////////////////////////////////////////////////////////////////
     
    150150
    151151  if (getNumVars(f)==0) return 1 ; // a constant is SqrFree
    152   if ( f.isUnivariate() ) {
     152  if ( f.isUnivariate() )
     153  {
    153154    g= f.deriv();
    154155    if ( getCharacteristic() > 0 && g.isZero() ) return 0 ;
     
    224225  if (getNumVars(f)==0 )
    225226  { // just a constant; return it
    226     Outputlist= myappend(Outputlist,CFFactor(f,1));
     227    Outputlist= CFFactor(f,1);
    227228    return Outputlist ;
    228229  }
     
    235236    {
    236237      g = swapvar(f,k,n); g = content(g);
    237       if ( ! (g.isOne() || (-g).isOne() || degree(g)==0 ))
     238      if ( ! (g.isOne() || (-g).isOne() || (degree(g)==0) ))
    238239      {
    239240        g = swapvar(g,k,n);
     
    325326    f /= h; // Now we have split the poly into f and h
    326327    g = lc(f);
    327     if ( g != f.genOne() && getNumVars(g) == 0 )
     328    if ( !g.isOne() && getNumVars(g) == 0 )
    328329    {
    329330       Outputlist= myappend(Outputlist,CFFactor(g,1)) ;
     
    455456/*
    456457$Log: not supported by cvs2svn $
     458Revision 1.21  2008/05/31 17:20:10  Singular
     459hannes: minor irras changes
     460
    457461Revision 1.20  2008/05/14 12:38:26  Singular
    458462*hannes: swapvar ->replacevar
Note: See TracChangeset for help on using the changeset viewer.