- Timestamp:
- Feb 9, 1998, 4:58:20 PM (26 years ago)
- Branches:
- (u'spielwiese', '2fa36c576e6a4ddbb1093b43c7f8e9835e17e52a')
- Children:
- abc625ea7218c401cfe020a534d5f30c28d85f75
- Parents:
- 57f656bdccad12e113db494c2a92c284f8130044
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_factor.cc
r57f656b rd6c703 1 1 /* emacs edit mode for this file is -*- C++ -*- */ 2 /* $Id: cf_factor.cc,v 1. 8 1997-12-08 18:24:23 schmidtExp $ */2 /* $Id: cf_factor.cc,v 1.9 1998-02-09 15:58:20 stobbe Exp $ */ 3 3 4 4 //{{{ docu … … 26 26 #include "fac_multivar.h" 27 27 #include "fac_sqrfree.h" 28 #include "cf_algorithm.h" 28 29 29 30 static bool isUnivariateBaseDomain( const CanonicalForm & f ) … … 48 49 } 49 50 else { 51 CanonicalForm cd = common_den( f ); 52 CanonicalForm fz = f * cd; 53 CFFList F; 54 bool on_rational = isOn(SW_RATIONAL); 55 Off(SW_RATIONAL); 50 56 if ( f.isUnivariate() ) 51 return ZFactorizeUnivariate( f, issqrfree );57 F = ZFactorizeUnivariate( fz, issqrfree ); 52 58 else 53 return ZFactorizeMultivariate( f, issqrfree ); 59 F = ZFactorizeMultivariate( fz, issqrfree ); 60 if ( on_rational ) 61 On(SW_RATIONAL); 62 if ( ! cd.isOne() ) { 63 if ( F.getFirst().factor().inCoeffDomain() ) { 64 CFFactor new_first( F.getFirst().factor() / cd ); 65 F.removeFirst(); 66 F.insert( new_first ); 67 } 68 else { 69 F.insert( CFFactor( 1/cd ) ); 70 } 71 } 72 return F; 54 73 } 55 74 }
Note: See TracChangeset
for help on using the changeset viewer.