#7742: add a compose function to sage
--------------------------------+-------------------------------------------
Reporter: was | Owner: AlexGhitza
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.6.1
Component: basic arithmetic | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------------+-------------------------------------------
Changes (by flawrence):
* status: needs_work => needs_review
Comment:
The new patch addresses many of the above concerns (other than symbolic
n), and splits the functionality into three functions:
* compose(f,g) which composes functions such that compose(f,g)(x) =
f(g(x))
* self_compose(f, n) which composes a function with itself such that
self_compose(f,n)(x) = f(...(f(x))...)
* nest(f, n, a) which effectively self_composes and evaluates (but does it
slightly faster than a self_compose)
Questions:
* compose(f,g)(x) = f(g(x)) - is this the most common convention among
mathematicians? or should the RHS be g(f(x))?
* Is (f, n, a) or (f, a, n) the best order of parameters for nest?
* Is there somewhere more suitable than misc/misc.py for these functions?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7742#comment:12>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.