On Friday, November 2, 2018 at 5:44:34 PM UTC-7, Emmanuel Charpentier wrote: > > One way to define (something almost the same as) what you want is : > sage: f=piecewise([((-oo,0),x^3),((0,oo),x^2)],var=x) > sage: f > piecewise(x|-->x^3 on (-oo, 0), x|-->x^2 on (0, +oo); x) > [...] Except for the point 0, for which the piecewise function is not > defined : > >> >> For the half-open interval, one needs to use RealSet constructors:
sage: f=piecewise([((-oo,0),x^3),(RealSet.unbounded_above_closed(0),x^2)],var=x) sage: f piecewise(x|-->x^3 on (-oo, 0), x|-->x^2 on [0, +oo); x) -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.