Changeset 688504 in git for factory/libfac/charset/alg_factor.cc
 Timestamp:
 Nov 15, 2012, 2:23:42 PM (11 years ago)
 Branches:
 (u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
 Children:
 885e7651730fe89cf8a58ca22e1b1d7138c20994
 Parents:
 1fa5f530f21cf131d9b12de91e97b266f26a08ff
 gitauthor:
 Martin Lee <martinlee84@web.de>20121115 14:23:42+01:00
 gitcommitter:
 Martin Lee <martinlee84@web.de>20121116 13:13:24+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

factory/libfac/charset/alg_factor.cc
r1fa5f53 r688504 76 76 { 77 77 current++; 78 }79 80 // replacement for factory's broken psr81 static CanonicalForm82 mypsr ( const CanonicalForm &rr, const CanonicalForm &vv, const Variable & x )83 {84 CanonicalForm r=rr, v=vv, l, test, lu, lv, t, retvalue;85 int dr, dv, d,n=0;86 87 88 dr = degree( r, x );89 dv = degree( v, x );90 if (dv <= dr) {l=LC(v,x); v = v l*power(x,dv);}91 else { l = 1; }92 d= drdv+1;93 while ( ( dv <= dr ) && ( r != r.genZero()) ){94 test = power(x,drdv)*v*LC(r,x);95 if ( dr == 0 ) { r= CanonicalForm(0); }96 else { r= r  LC(r,x)*power(x,dr); }97 r= l*r test;98 dr= degree(r,x);99 n+=1;100 }101 r= power(l, dn)*r;102 return r;103 78 } 104 79
Note: See TracChangeset
for help on using the changeset viewer.