Changeset 6538bd in git
- Timestamp:
- Apr 6, 2016, 3:40:08 PM (8 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- b5fe229e050d2307170596d0863df47990daae6a
- Parents:
- 281335d5bbcb1497be84e729427cf2f4b494c484
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/polys/monomials/p_polys.cc
r281335 r6538bd 2094 2094 } 2095 2095 2096 static poly p_Pow_charp(poly p, int i, const ring r) 2097 { 2098 //assume char_p == i 2099 poly h=p; 2100 while(h!=NULL) { p_MonPower(h,i,r);pIter(h);} 2101 return p; 2102 } 2103 2096 2104 /*2 2097 2105 * returns the i-th power of p … … 2157 2165 /* else: binom ?*/ 2158 2166 int char_p=rChar(r); 2167 if ((char_p>0) && (i>char_p) 2168 && ((rField_is_Zp(r,char_p) 2169 || (rField_is_Zp_a(r,char_p))))) 2170 { 2171 poly h=p_Pow_charp(p_Copy(p,r),char_p,r); 2172 int rest=i-char_p; 2173 while (rest>=char_p) 2174 { 2175 rest-=char_p; 2176 h=p_Mult_q(h,p_Pow_charp(p_Copy(p,r),char_p,r),r); 2177 } 2178 poly res=h; 2179 if (rest>0) 2180 res=p_Mult_q(p_Power(p_Copy(p,r),rest,r),h,r); 2181 p_Delete(&p,r); 2182 return res; 2183 } 2159 2184 if ((pNext(rc) != NULL) 2160 2185 #ifdef HAVE_RINGS
Note: See TracChangeset
for help on using the changeset viewer.