#4446: New module complex_mpc using lib mpc for complex multiprecision
arithmetic
--------------------------------+-------------------------------------------
Reporter: thevenyp | Owner: mabshoff
Type: enhancement | Status: needs_info
Priority: major | Milestone: sage-4.3.4
Component: basic arithmetic | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------------+-------------------------------------------
Comment(by zimmerma):
with the attached MPC program I get on a 2.83Ghz Core 2 under Fedora Core
2, with GMP 5.0.1 and
MPFR 2.4.2
{{{
tarte% ./sage
mpc_log took 74us per loop
mpc_exp took 24us per loop
mpc_pow(12345) took 260us per loop
mpc_div took 3.4us per loop
}}}
and within Sage with ComplexField I get (where I took the best of 3
%timeit runs):
{{{
sage: %timeit c=a.log()
625 loops, best of 3: 173 µs per loop
sage: %timeit c=a.exp()
625 loops, best of 3: 37.1 µs per loop
sage: %timeit c=a**12345
625 loops, best of 3: 26.6 µs per loop
sage: %timeit c=a/b
625 loops, best of 3: 2.71 µs per loop
}}}
thus we indeed need to work on powint, but the division is only 25%
slower.
While doing this test I also noticed this strange thing with ComplexField:
{{{
sage: smallb = CC(b)
sage: %timeit c=a/b
625 loops, best of 3: 2.69 µs per loop
sage: %timeit c=a/smallb
625 loops, best of 3: 290 µs per loop
}}}
thus dividing by a 53-bit complex is 100 times slower than dividing by a
500-bit complex!
Should I open a separate ticket for that?
Did somebody check the 500-bit outputs of CC and MPC agree?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4446#comment:20>
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.