#17553: substitute_function() can leave limits unevaluated
-----------------------------+------------------------
Reporter: wonder | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.4
Component: symbolics | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
-----------------------------+------------------------
Comment (by wonder):
Hmm, I didn't realize you could use python functions in
`substitute_function`. Just noticed that when looking through
`expression_conversions.py`. Given that, this seems to work:
{{{
sage: l = limit( function('f')(x), x=0.1 )
sage: ls = l.substitute_function( function('f'), (1 - exp(-x)).function(x)
)
sage: ls
limit(-e^(-x) + 1, x, 0.1)
sage: def eval_limit( ex, var, val ):
kv = { str(var):val }
return limit( ex, **kv )
....:
sage: ls.substitute_function( l.operator(), eval_limit )
0.09516258196404048
}}}
:-)
Note using `sage.symbolic.function_factory.function('limit')` in place of
`l.operator()` does not work.
--
Ticket URL: <http://trac.sagemath.org/ticket/17553#comment:4>
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.