#14801: Piecewise functions done right
-------------------------------------+-------------------------------------
Reporter: vbraun | Owner: rws
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.6
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: Volker Braun, | Reviewers:
Ralf Stephan | Work issues:
Report Upstream: N/A | Commit:
Branch: | 64bbe5393ffc24ae3551644e5171692e7f7a2dd6
public/piecewise-2 | Stopgaps:
Dependencies: #14800, #14780, |
#9556, #13125, #14802, #16397, |
#17759 |
-------------------------------------+-------------------------------------
Comment (by rws):
Indeed, as the discussion in https://groups.google.com/forum/?hl=en#!topic
/sage-devel/dgwUMsdiHfM foresaw, lambdas will be a problem with this, as
they cannot be coerced to SR.
{{{
sage: f1 = lambda x: -1; f2 = lambda x: 2
sage: piecewise([((0,pi/2),f1), ((pi/2,pi),f2)])
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
}}}
There is one doctest in src/doc/en/constructions/calculus.rst that
requires it.
But it doesn't even work with `NewSymbolicFunction`:
{{{
sage: function('newf2')(x)
newf2(x)
sage: piecewise([((0,pi/2),x), ((pi/2,pi),f2)])
}}}
for which there seems a solution in #17701.
--
Ticket URL: <http://trac.sagemath.org/ticket/14801#comment:51>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.