#14801: Piecewise functions done right
-------------------------------------+-------------------------------------
Reporter: vbraun | Owner: burcin
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: Volker Braun, | Reviewers:
Ralf Stephan | Work issues:
Report Upstream: N/A | Commit:
Branch: public/piecewise | 262b01e0de35a35d46fedda5e99255a26b9b36fa
Dependencies: #14800, #14780, | Stopgaps:
#9556, #13125, #14802, #16397 |
-------------------------------------+-------------------------------------
Comment (by jdemeyer):
Replying to [comment:28 rws]:
> {{{
> sage: f(x) = piecewise([((0,2), y^3)],var=x)
> }}}
I don't like that one need to write `var=x`. I think the following should
work somehow:
{{{
sage: f(x) = piecewise([((0,2), y^3)])
}}}
I understand the semantics are not easy, because you are using the
variable twice: once for the condition on the domain (`0 < x < 2`) and
once to evaluate the function (`y^3`). In a way, you want the result of
`piecewise(...)` to be like `sin` but also like `sin(x)`.
--
Ticket URL: <http://trac.sagemath.org/ticket/14801#comment:29>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.