#11885: call function in sage.libs.mpmath.utils doesn't handle 
parent=parent(float)
------------------------------+---------------------------------------------
   Reporter:  benjaminfjones  |          Owner:  burcin                      
       Type:  defect          |         Status:  needs_review                
   Priority:  major           |      Milestone:  sage-4.7.2                  
  Component:  symbolics       |       Keywords:  mpmath call parent precision
Work_issues:                  |       Upstream:  N/A                         
   Reviewer:  Burcin Erocal   |         Author:  Benjamin Jones              
     Merged:                  |   Dependencies:                              
------------------------------+---------------------------------------------

Comment(by leif):

 Replying to [comment:3 benjaminfjones]:
 > Good point! I made the change and added a doctest to `call()` to
 illustrate that the bug is fixed.
 >
 > The change does give a speedup. The best case I found was running
 {{{
 sage: timeit('mputils.call(a.ei, 1.0r, parent=float)')
 }}}
 >
 > Before the old patch, I was getting about 87 micro seconds. With the new
 patch, the best time I got was about 60 micro seconds.

 I'm not sure whether that's a deterministic result.

 But Burcin is right, using `try: ...` is (at least) faster ''in case
 `parent` '''does''' have a `prec()` method''.

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