#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 ylchapuy):

 First, I added a small patch to rebase this on sage 4.3.3.

 One need to apply:

  * mpc-0.8.1.patch
  * bug_literal.patch
  * trac4446-rebase_sage4.3.3.patch

 in this order; and of course install the spkg:

  * http://yann.laiglechapuy.net/spkg/mpc-0.8.1.p0.spkg

 Then, here is an example with the exact input (I only put the last part
 concerning `pow`)
 {{{
 a.real().exact_rational()
 
-1558022726154386835635734102276225872461248356241845468520145243680772756232147166398716395960573602794592840676040928991781722240298082039889553874139/1636695303948070935006594848413799576108321023021532394741645684048066898202337277441635046162952078575443342063780035504608628272942696526664263794688
 a.imag().exact_rational()
 
38743143824869548998159480051850490241205026500878413377278464034858416981434423320408166976481329585622042476431430168493334123089110626626927265425/102293456496754433437912178025862473506770063938845774671352855253004181137646079840102190385184504910965208878986252219038039267058918532916516487168
 ------------------------
 a.log()
 CC 5000 loops, best of 3: 170 µs per loop
 MPC 5000 loops, best of 3: 143 µs per loop
 ------------------------
 a.exp()
 CC 5000 loops, best of 3: 45.6 µs per loop
 MPC 5000 loops, best of 3: 49.1 µs per loop
 ------------------------
 a**12345
 CC 5000 loops, best of 3: 48.7 µs per loop
 MPC 5000 loops, best of 3: 501 µs per loop
 }}}

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