Changeset 20722e4 in git


Ignore:
Timestamp:
Apr 28, 2006, 3:46:29 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
Children:
a285490a201ea1e883f387408479c5758aaff48f
Parents:
f45bfb991cabced656e450cbed9e85720c469e54
Message:
*hannes: better tests for 0, 1


git-svn-id: file:///usr/local/Singular/svn/trunk@9078 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
libfac
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libfac/charset/csutil.cc

    rf45bfb r20722e4  
    22////////////////////////////////////////////////////////////
    33// emacs edit mode for this file is -*- C++ -*-
    4 static char * rcsid = "$Id: csutil.cc,v 1.9 2003-05-28 11:52:52 Singular Exp $";
     4static char * rcsid = "$Id: csutil.cc,v 1.10 2006-04-28 13:45:29 Singular Exp $";
    55/////////////////////////////////////////////////////////////
    66// FACTORY - Includes
     
    227227 CanonicalForm rem=f;
    228228
    229  if ( rem!=0 ){
     229 if ( !(rem.isZero()) ){
    230230   if ( getCharacteristic() > 0 )
    231231     return num((rem/lc(rem)));
     
    312312
    313313  for ( CFIterator j=init; j.hasTerms(); j++ )
    314     if (j.coeff() != 1 ) count += 1;
     314    if (!(j.coeff().isOne()) ) count += 1;
    315315  //  if ( init != 1 ){
    316316  //  cout << "nopower: f is " << init << endl;
     
    873873/*
    874874$Log: not supported by cvs2svn $
     875Revision 1.9  2003/05/28 11:52:52  Singular
     876*pfister/hannes: newfactoras, alg_gcd, divide (see bug_33)
     877
    875878Revision 1.8  2002/10/24 17:22:22  Singular
    876879* hannes: factoring in alg.ext., alg_gcd, NTL stuff
  • libfac/factor/Factor.cc

    rf45bfb r20722e4  
    11/* Copyright 1996 Michael Messollen. All rights reserved. */
    22///////////////////////////////////////////////////////////////////////////////
    3 static char * rcsid = "$Id: Factor.cc,v 1.21 2005-12-12 18:02:03 Singular Exp $ ";
     3static char * rcsid = "$Id: Factor.cc,v 1.22 2006-04-28 13:46:29 Singular Exp $ ";
    44static char * errmsg = "\nYou found a bug!\nPlease inform (Michael Messollen) michael@math.uni-sb.de \nPlease include above information and your input (the ideal/polynomial and characteristic) in your bug-report.\nThank you.";
    55///////////////////////////////////////////////////////////////////////////////
     
    652652    ffuni = mygcd(f,ff);
    653653    TIMING_END(discr_time);
    654     if ( ffuni != 1 ){ //discriminante nonzero: split poly
     654    if ( !(ffuni.isOne()) ){ //discriminante nonzero: split poly
    655655      DEBOUTLN(cout,"Nontrivial GCD of f= ", f);
    656656      DEBOUTLN(cout,"             and @f= ", ff);
     
    11241124/*
    11251125$Log: not supported by cvs2svn $
     1126Revision 1.21  2005/12/12 18:02:03  Singular
     1127*hannes: use sorting option in Factorize
     1128
    11261129Revision 1.20  2005/12/05 15:47:32  Singular
    11271130*hannes: is_homogeneous -> factory: isHomogeneous
  • libfac/factor/SqrFree.cc

    rf45bfb r20722e4  
    22///////////////////////////////////////////////////////////////////////////////
    33// emacs edit mode for this file is -*- C++ -*-
    4 static char * rcsid = "$Id: SqrFree.cc,v 1.8 2002-08-19 11:11:33 Singular Exp $";
     4static char * rcsid = "$Id: SqrFree.cc,v 1.9 2006-04-28 13:46:29 Singular Exp $";
    55static char * errmsg = "\nYou found a bug!\nPlease inform (Michael Messollen) michael@math.uni-sb.de .\n Please include above information and your input (the ideal/polynomial and characteristic) in your bug-report.\nThank you.";
    66///////////////////////////////////////////////////////////////////////////////
     
    387387      if ( i.getItem().exp() == j ) elem *= i.getItem().factor();
    388388    }
    389     if ( elem != 1 ) outputlist.append(CFFactor(elem,j));
     389    if ( !(elem.isOne()) ) outputlist.append(CFFactor(elem,j));
    390390  }
    391391  elem=1;
     
    403403/*
    404404$Log: not supported by cvs2svn $
     405Revision 1.8  2002/08/19 11:11:33  Singular
     406* hannes/pfister: alg_gcd etc.
     407
    405408Revision 1.7  2001/08/08 14:27:38  Singular
    406409*hannes: Dan's HAVE_SINGULAR_ERROR
Note: See TracChangeset for help on using the changeset viewer.