Changeset d6b072c in git


Ignore:
Timestamp:
May 20, 1996, 3:39:48 PM (28 years ago)
Author:
Rüdiger Stobbe <stobbe@…>
Branches:
(u'spielwiese', 'e7cc1ebecb61be8b9ca6c18016352af89940b21a')
Children:
76470b9a30fae98fb8f716432d745cf299a95b33
Parents:
17fdd790965f3a15247d3eaa31fc2491357bdc2e
Message:
"sqrFree: Now the product of all factors found by sqrFree is equal to the
         parameter of sqrFree. The bug resulted from an incorrect handling
         of the leading coefficient of the argument of sqrFree.
"


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

Legend:

Unmodified
Added
Removed
  • factory/fac_sqrfree.cc

    r17fdd7 rd6b072c  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: fac_sqrfree.cc,v 1.0 1996-05-17 10:59:45 stobbe Exp $
     2// $Id: fac_sqrfree.cc,v 1.1 1996-05-20 13:39:48 stobbe Exp $
    33
    44#include "assert.h"
     
    88/*
    99$Log: not supported by cvs2svn $
     10// Revision 1.0  1996/05/17  10:59:45  stobbe
     11// Initial revision
     12//
    1013*/
    1114
     
    2023{
    2124    CanonicalForm t0 = f, t, v, w, h;
     25    CanonicalForm leadcf = t0.lc();
    2226    Variable x = f.mvar();
    2327    CFFList F;
    2428    int p = getCharacteristic();
    2529    int k, e = 1;
     30
     31    if ( ! leadcf.isOne() )
     32        t0 /= leadcf;
    2633
    2734    divexp = p;
     
    4148            t /= v;
    4249            if ( h.degree(x) > 0 )
    43                 F.append( CFFactor( h, e*k ) );
     50                F.append( CFFactor( h/h.lc(), e*k ) );
    4451        }
    4552        t0 = apply( t, divexpfunc );
    4653        e = p * e;
     54    }
     55    if ( ! leadcf.isOne() ) {
     56        if ( F.getFirst().exp() == 1 ) {
     57            leadcf = F.getFirst().factor() * leadcf;
     58            F.removeFirst();
     59        }
     60        F.insert( CFFactor( leadcf, 1 ) );
    4761    }
    4862    return F;
Note: See TracChangeset for help on using the changeset viewer.