Changeset ad82f6 in git
 Timestamp:
 Sep 22, 2008, 6:27:17 PM (15 years ago)
 Branches:
 (u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
 Children:
 d97aa56019829e7ee4d56c080928c7930fabeca9
 Parents:
 8492bd5dbfc42db0b4dbc2cf846ce087318ce006
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/cf_algorithm.cc
r8492bd5 rad82f6 1 1 /* emacs edit mode for this file is * C++ * */ 2 /* $Id: cf_algorithm.cc,v 1.1 3 20080619 15:58:18Singular Exp $ */2 /* $Id: cf_algorithm.cc,v 1.14 20080922 16:27:17 Singular Exp $ */ 3 3 4 4 //{{{ docu … … 30 30 #include "cf_iter.h" 31 31 #include "ftmpl_functions.h" 32 33 void out_cf(char *s1,const CanonicalForm &f,char *s2); 32 34 33 35 //{{{ CanonicalForm psr ( const CanonicalForm & f, const CanonicalForm & g, const Variable & x ) … … 109 111 } 110 112 #else 111 psr ( const CanonicalForm &rr, const CanonicalForm &vv, const Variable & x ){ 113 psr ( const CanonicalForm &rr, const CanonicalForm &vv, const Variable & x ) 114 { 112 115 CanonicalForm r=rr, v=vv, l, test, lu, lv, t, retvalue; 113 116 int dr, dv, d,n=0; … … 115 118 116 119 dr = degree( r, x ); 117 dv = degree( v, x ); 118 if (dv <= dr) {l=LC(v,x); v = v l*power(x,dv);} 119 else { l = 1; } 120 d= drdv+1; 121 while ( ( dv <= dr ) && ( r != r.genZero()) ) 120 if (dr>0) 122 121 { 123 test = power(x,drdv)*v*LC(r,x); 124 if ( dr == 0 ) { r= CanonicalForm(0); } 125 else { r= r  LC(r,x)*power(x,dr); } 126 r= l*r test; 127 dr= degree(r,x); 128 n+=1; 122 dv = degree( v, x ); 123 if (dv <= dr) {l=LC(v,x); v = v l*power(x,dv);} 124 else { l = 1; } 125 d= drdv+1; 126 //out_cf("psr(",rr," "); 127 //out_cf("",vv," "); 128 //printf(" var=%d\n",x.level()); 129 while ( ( dv <= dr ) && ( !r.isZero()) ) 130 { 131 test = power(x,drdv)*v*LC(r,x); 132 if ( dr == 0 ) { r= CanonicalForm(0); } 133 else { r= r  LC(r,x)*power(x,dr); } 134 r= l*r test; 135 dr= degree(r,x); 136 n+=1; 137 } 138 r= power(l, dn)*r; 129 139 } 130 r= power(l, dn)*r;131 140 return r; 132 141 }
Note: See TracChangeset
for help on using the changeset viewer.