Changeset e2dd6e in git for libpolys/polys/monomials/p_polys.cc
- Timestamp:
- Apr 30, 2013, 11:18:19 PM (11 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
- Children:
- b79fd76a535a05f415a6fd8c00ffbff7f2d2a32d
- Parents:
- 232a34c254032045d3fbc55b3c260a4044ccd608f1d88ec2c56f693af48faa279e80b42e6d11b48b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/monomials/p_polys.cc
rf1d88e re2dd6e 2120 2120 } 2121 2121 n_Delete(&h,r->cf); 2122 #ifdef HAVE_FACTORY2123 // if ( (n_GetChar(r) == 1) || (n_GetChar(r) < 0) ) /* Q[a],Q(a),Zp[a],Z/p(a) */2124 // {2125 // singclap_divide_content(ph, r);2126 // if(!n_GreaterZero(pGetCoeff(ph),r->cf)) ph = p_Neg(ph,r);2127 // }2128 #endif2129 2122 if (rField_is_Q_a(r)) 2130 2123 { 2131 // we only need special handling for alg. ext.2124 // special handling for alg. ext.: 2132 2125 if (getCoeffType(r->cf)==n_algExt) 2133 2126 { … … 2166 2159 } 2167 2160 pIter(p); 2161 } 2162 } 2163 n_Delete(&h,r->cf->extRing->cf); 2164 } 2165 else 2166 { 2167 // special handling for rat. functions.: 2168 number hzz =NULL; 2169 p=ph; 2170 while (p!=NULL) 2171 { // each monom: coeff in Q_a 2172 fraction f=(fraction)pGetCoeff(p); 2173 poly c_n=NUM(f); 2174 if (hzz==NULL) 2175 { 2176 hzz=n_Copy(pGetCoeff(c_n),r->cf->extRing->cf); 2177 pIter(c_n); 2178 } 2179 while ((c_n!=NULL)&&(!n_IsOne(hzz,r->cf->extRing->cf))) 2180 { // each monom: coeff in Q 2181 d=n_Gcd(hzz,pGetCoeff(c_n),r->cf->extRing->cf); 2182 n_Delete(&hzz,r->cf->extRing->cf); 2183 hzz=d; 2184 pIter(c_n); 2185 } 2186 pIter(p); 2187 } 2188 /* hzz contains the gcd of all numerators in f*/ 2189 h=n_Invers(hzz,r->cf->extRing->cf); 2190 n_Delete(&hzz,r->cf->extRing->cf); 2191 n_Normalize(h,r->cf->extRing->cf); 2192 if(!n_IsOne(h,r->cf->extRing->cf)) 2193 { 2194 p=ph; 2195 while (p!=NULL) 2196 { // each monom: coeff in Q_a 2197 fraction f=(fraction)pGetCoeff(p); 2198 NUM(f)=p_Mult_nn(NUM(f),h,r->cf->extRing); 2199 p_Normalize(NUM(f),r->cf->extRing); 2200 pIter(p); 2168 2201 } 2169 2202 }
Note: See TracChangeset
for help on using the changeset viewer.