Ticket #3655: 10058.patch
| File 10058.patch, 1.9 kB (added by wdj, 6 months ago) |
|---|
-
a/sage/functions/piecewise.py
old new 33 33 domain 34 34 range 35 35 list 36 __add__ - addition (of functions) 37 __mul__ - multiplication (of functions, or fcn*scalar - ie, *right* multiplication by QQ) 36 __add__ - addition (of functions) 37 __mul__ - multiplication (of functions, or fcn*scalar - ie, *right* multiplication by QQ) 38 __rmul__ - *left* multiplication by QQ 38 39 extend_by_zero_to 39 40 unextend 40 41 … … 66 67 DJ (2007-09) - bug fixes due to behaviour of SymbolicArithmetic 67 68 DJ (2008-04) - fixed docstring bugs reported by J Morrow; added support for 68 69 laplace transform of functions with infinite support. 70 DJ (2008-07) - fixed a left multiplication bug reported by C. Boncelet 71 (by defining __rmul__ = __mul__). 69 72 70 73 """ 71 74 … … 1334 1337 def __add__(self,other): 1335 1338 """ 1336 1339 Returns the piecewise defined function which is the sum of 1337 self and other. Does not require both domains be the same.1340 self and other. Does not require both domains be the same. 1338 1341 1339 1342 EXAMPLES: 1340 1343 sage: x = PolynomialRing(QQ,'x').gen() … … 1415 1418 fcn.append([(endpts[j],endpts[j+1]),self.which_function(x0)*other.which_function(x0)]) 1416 1419 return Piecewise(fcn) 1417 1420 1421 __rmul__ = __mul__ 1422 1418 1423 def __eq__(self,other): 1419 1424 """ 1420 1425 Implements Boolean == operator.