#6899: [with patch, needs review] weird bug taking float of real part of a
symbolic
---------------------------+------------------------------------------------
Reporter: was | Owner: mhansen
Type: defect | Status: assigned
Priority: major | Milestone: sage-4.1.2
Component: calculus | Keywords:
Reviewer: Burcin Erocal | Author: Mike Hansen, Burcin Erocal
Merged: |
---------------------------+------------------------------------------------
Changes (by newvalueoldvalue):
* reviewer: => Burcin Erocal
* author: Mike Hansen => Mike Hansen, Burcin Erocal
Comment:
attachment:trac_6899.take2.patch doesn't go through python function calls
for the conversions. Thus, it is much faster.
With the python calls to `.is_real()` and `.real_part()`:
{{{
sage: t = CC([2^20,0])
sage: float(t)
1048576.0
sage: %timeit u = float(t)
100000 loops, best of 3: 1.48 µs per loop
}}}
Using mpfr directly:
{{{
sage: t = CC([2^20,0])
sage: float(t)
1048576.0
sage: %timeit u = float(t)
1000000 loops, best of 3: 221 ns per loop
}}}
I give a positive review to Mike's changes. Mike, can you look over the
two lines I touched?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6899#comment:2>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---