#4446: [with patch, needs more doctests] 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 review] New module complex_mpc using lib
mpc for complex multiprecision arithmetic =>
[with patch, needs more doctests] New module
complex_mpc using lib mpc for complex
multiprecision arithmetic
Comment:
There are a few small issues that I ran into, but since this is going to
be (for now) an optional part of Sage and nothing depends on it, I think
we can fix these later (I'm keeping a list of them so they don't get
lost).
However, there is a policy of 100% doctest for all new code. The coverage
is now:
{{{
[EMAIL PROTECTED] sage]$ sage -coverage rings/complex_mpc.pyx
----------------------------------------------------------------------
rings/complex_mpc.pyx
SCORE rings/complex_mpc.pyx: 68% (46 of 67)
Missing documentation:
* _repr_ (self):
* _latex_(self):
* _an_element_(self):
* random_element(self, bound):
* __hash__(self):
* prec(self):
* _set(self, z, y=None, base=10):
* _repr_(self):
* _latex_(self):
* ModuleElement _add_(self, ModuleElement right):
* ModuleElement _sub_(self, ModuleElement right):
* RingElement _mul_(self, RingElement right):
* RingElement _div_(self, RingElement right):
* ModuleElement _neg_(self):
* __create__MPComplexField_version0 (prec, rnd):
* __create_MPComplexNumber_version0 (parent, s, base=10):
Missing doctests:
* _rnd(self):
* _rnd_re(self):
* _rnd_im(self):
* _real_field(self):
* _imag_field(self):
Possibly wrong (function name doesn't occur in doctests):
* _element_constructor_(self, z):
* _coerce_map_from_(self, S):
* bint is_exact(self) except -2: return False def
is_finite(self):
* Element _call_(self, z):
* Element _call_(self, x):
----------------------------------------------------------------------
}}}
So the missing docstrings and doctests will have to be added before this
patch can be merged. I would happily do this but the earliest I can get
to it is Thursday or so (and that's being optimistic).
To end on a positive note: this looks good. It will take a bit more work,
but if we can show that (a) the performance is improved, or doesn't suffer
too much, and (b) the switch can be made seamlessly, then it will be easy
to convince people that we should switch the core of our complex numbers
functionality over to MPC.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4446#comment:5>
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
-~----------~----~----~----~------~----~------~--~---