id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
12123 Bug in convolution in old Piecewise kcrisman burcin "The old Piecewise (pre #14801; now deprecated) has this bug:
{{{
sage: x = PolynomialRing(QQ,'x').gen()
sage: f = Piecewise([[(-2, 2), 2 * x^0]])
sage: g = Piecewise([[(0, 2), 3/4 * x^0]])
sage: n = f.convolution(g)
sage: n
Piecewise defined function with 3 parts, [[(-2, 0), 3/2*x + 3], [(0, 2), 6], [(2, 4), -3/2*x + 6]]
}}}
But the middle piece should be 3, not 6, apparently.
See the original report at [http://ask.sagemath.org/question/965/convolution-got-the-wrong-result this ask.sagemath.org question].
Note this is fixed in the new `piecewise` (lowercase p, from #14801).
{{{
sage: x = PolynomialRing(QQ,'x').gen()
sage: f = piecewise([[(-2, 2), 2 * x^0]])
sage: g = piecewise([[(0, 2), 3/4 * x^0]])
sage: n = f.convolution(g)
sage: n
piecewise(x|-->3/2*x + 3 on (-2, 0], x|-->3 on (0, 2], x|-->-3/2*x + 6 on (2, 4]; x)
}}}
Can close this bug when the old `Piecewise` is removed completely.
" defect closed minor sage-duplicate/invalid/wontfix calculus invalid piecewise wdj kcrisman jondo vbraun slelievre mkoeppe eviatarbach rws Travis Scrimshaw N/A todo