#4446: [with patches, needs review] New module complex_mpc using lib mpc for
complex multiprecision arithmetic
-------------------------------+--------------------------------------------
Reporter: thevenyp | Owner: mabshoff
Type: enhancement | Status: new
Priority: major | Milestone: sage-3.2.2
Component: optional packages | Resolution:
Keywords: |
-------------------------------+--------------------------------------------
Changes (by AlexGhitza):
* summary: [with patch, needs more doctests] New module complex_mpc
using lib mpc for complex multiprecision
arithmetic => [with patches, needs review] New
module complex_mpc using lib mpc for complex
multiprecision arithmetic
Comment:
I added a patch trac4446_doctests.patch, which does a number of things:
* adds doctests for all functions except three internal use only
functions
* changes _repr_ of complex numbers so that it agrees with the way
complex numbers are currently printed in Sage
* makes MPComplexField inherit from ParentWithGens, being generated over
its real field by the square root of -1 (just as it is now); this required
adding a few functions. So now one can do
{{{
sage: from sage.rings.complex_mpc import MPComplexField
sage: MPC.<j> = MPComplexField()
sage: j^2
-1.00000000000000 + 0.000000000000000*I
}}}
Note that only the last three patches should be applied, in order:
complex_mpc.p0.patch, trac4446_fix.patch, and trac4446_doctests.patch
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4446#comment:7>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---