#7742: add a compose function to sage
------------------------------------------------+---------------------------
   Reporter:  was                               |       Owner:  AlexGhitza
       Type:  defect                            |      Status:  needs_work
   Priority:  major                             |   Milestone:  sage-4.6.1
  Component:  basic arithmetic                  |    Keywords:            
     Author:  Christopher Olah, Felix Lawrence  |    Upstream:  N/A       
   Reviewer:  Paul Zimmermann                   |      Merged:            
Work_issues:                                    |  
------------------------------------------------+---------------------------
Changes (by newvalueoldvalue):

  * status:  needs_review => needs_work
  * reviewer:  => Paul Zimmermann
  * author:  => Christopher Olah, Felix Lawrence


Comment:

 This needs more work, since the function {{{self_compose}}} fails for n=0:
 {{{
 sage: function('f');
 sage: h=self_compose(f,0)
 ---------------------------------------------------------------------------
 ValueError                                Traceback (most recent call
 last)

 /localdisk/tmp/sage-4.6/<ipython console> in <module>()

 /localdisk/tmp/sage-4.6/local/lib/python2.6/site-
 packages/sage/misc/misc.pyc in self_compose(f, n)
     890     # all necessary powers of two (f, f^2, f^4), storing them in a
 list
     891     fs = [f]
 --> 892     for i in xrange(int(floor(log(n, 2)))):
     893         fs.append(compose(fs[i], fs[i]))
     894

 ValueError: math domain error
 }}}
 Paul

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7742#comment:15>
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.

Reply via email to