Changes between Version 8 and Version 11 of Ticket #11225
 Timestamp:
 06/25/16 18:33:21 (5 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #11225
 Property Cc jondo kcrisman vbraun slelievre mkoeppe eviatarbach rws added
 Property Keywords piecewise added

Property
Dependencies
changed from
to
#14801

Ticket #11225 – Description
v8 v11 1 Until we actually totally rewrite piecewise functions , we should improve some things.1 Until we actually totally rewrite piecewise functions (done in #14801), we should improve some things. 2 2 3 3 For concreteness, here is one thing that should work but doesn't. I'm sure there are more  add to this list, and then whatever isn't fixed in this ticket can be moved to another ticket. I just want to make sure they're listed in one place, not ten tickets. … … 16 16 AttributeError: PiecewisePolynomial instance has no attribute '__float__' 17 17 }}} 18 19 Both examples work in the new `piecewise` (#14801): 20 {{{ 21 sage: f = piecewise([[(0,1),x^3], [(1,2),x^2]], var=x) 22 sage: plot([f,x^3],(x,0,2)) 23 }}} 24 {{{ 25 sage: f = piecewise([[(2,1),1],[(1,4),x]]) 26 sage: g = piecewise([[(2,1),1],[(1,4),2*x]]) 27 sage: plot([f,g], xmin=3, xmax=5) 28 }}} 29 18 30 * plotting a product of a piecewise with a symbolic (well, the problem is multiplying the two, but still worth putting here  see [http://groups.google.com/group/sagesupport/browse_thread/thread/7357d08529de32dd this sagesupport thread]) 31 32 fixed in new `piecewise` 33 19 34 * Maybe unify with `plot_step_function`, which currently is sort of its own thing? 20 35 * In this example: … … 34 49 * You can try plot(g), but that turns out to uncover a very strange error that may or may not be a bug. 35 50 51 In new `piecewise` (#14801) 0 is no longer in the domain (open intervals?); and there is now support for unbounded intervals. 52 {{{ 53 sage: zero_func(x)=0 54 sage: g = piecewise([[(1000,1),zero_func],[(1,1000),(x1)^3]]) 55 sage: G = g.plot() 56 sage: G.show(xmin=5,xmax=5,ymax=100) 57 Launched png viewer for Graphics object consisting of 1 graphics primitive 58 sage: g(1) 59 ValueError: point 1 is not in the domain 60 }}} 61 36 62 See also #1773.