Changeset 36652d8 in git for factory


Ignore:
Timestamp:
Jun 26, 1996, 3:15:28 PM (28 years ago)
Author:
Rüdiger Stobbe <stobbe@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
af4c5612a18aeb436641ed03ae4ea4fb66c029dc
Parents:
95f247516b202e419d274f3f954f152ab83c4184
Message:
"sqrFreeZ: Now handles the sign of the argument right.
"


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

Legend:

Unmodified
Added
Removed
  • factory/fac_sqrfree.cc

    r95f247 r36652d8  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: fac_sqrfree.cc,v 1.1 1996-05-20 13:39:48 stobbe Exp $
     2// $Id: fac_sqrfree.cc,v 1.2 1996-06-26 13:15:28 stobbe Exp $
    33
    44#include "assert.h"
     
    88/*
    99$Log: not supported by cvs2svn $
     10Revision 1.1  1996/05/20 13:39:48  stobbe
     11"sqrFree: Now the product of all factors found by sqrFree is equal to the
     12         parameter of sqrFree. The bug resulted from an incorrect handling
     13         of the leading coefficient of the argument of sqrFree.
     14"
     15
    1016// Revision 1.0  1996/05/17  10:59:45  stobbe
    1117// Initial revision
     
    128134        else
    129135            F.append( CFFactor( w, i ) );
    130     if ( ! cont.isOne() )
    131         return Union( F, sqrFreeZ( cont ) );
    132     else
    133         return F;
     136    if ( ! cont.isOne() && ! cont.inCoeffDomain() )
     137        F = Union( F, sqrFreeZ( cont ) );
     138    if ( lc( a ).sign() < 0 ) {
     139        if ( F.getFirst().exp() == 1 ) {
     140            CanonicalForm f = F.getFirst().factor();
     141            CFFListIterator(F).getItem() = CFFactor( -f, 1 );
     142        }
     143        else
     144            F.insert( CFFactor( -1, 1 ) );
     145    }
     146    return F;
    134147}
Note: See TracChangeset for help on using the changeset viewer.