# HG changeset patch
# User Simon King <simon.king@nuigalway.ie>
# Date 1259709535 0
# Node ID 3c7f788ea9cf10aa7723a650cbd2162cc34c6367
# Parent 5db805d3bdafb3f79835cff2af6a333f749b500c
Improving performance of basic arithmetic in infinite polynomial rings
diff r 5db805d3bdaf r 3c7f788ea9cf sage/rings/polynomial/infinite_polynomial_element.py
a

b


1157  1157  x2 + x1 
1158  1158  
1159  1159  """ 
 1160  P = self.parent() 
 1161  self._p = P._P(self._p) 
 1162  x._p = P._P(x._p) 
1160  1163  return InfinitePolynomial_dense(self.parent(),self._p + x._p, is_good_poly=True) 
1161  1164  
1162  1165  def _mul_(self, x): 
… 
… 

1168  1171  x2*x1 
1169  1172  
1170  1173  """ 
 1174  P = self.parent() 
 1175  self._p = P._P(self._p) 
 1176  x._p = P._P(x._p) 
1171  1177  return InfinitePolynomial_dense(self.parent(),self._p * x._p, is_good_poly=True) 
1172  1178  
1173  1179  
… 
… 

1203  1209  x2  x1 
1204  1210  
1205  1211  """ 
 1212  P = self.parent() 
 1213  self._p = P._P(self._p) 
 1214  x._p = P._P(x._p) 
1206  1215  return InfinitePolynomial_dense(self.parent(), self._p  x._p, is_good_poly=True) 
1207  1216  
1208  1217  def __pow__(self, n): 