Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New module complex_mpc using lib mpc for complex multiprecision arithmetic #4446

Closed
sagetrac-thevenyp mannequin opened this issue Nov 5, 2008 · 80 comments
Closed

New module complex_mpc using lib mpc for complex multiprecision arithmetic #4446

sagetrac-thevenyp mannequin opened this issue Nov 5, 2008 · 80 comments

Comments

@sagetrac-thevenyp
Copy link
Mannequin

sagetrac-thevenyp mannequin commented Nov 5, 2008

Herewith and there (http://www.loria.fr/~thevenyp/complex_mpc.patch 38K) is a patch with new classes using the MPC library for complex multi-precision arithmetic (see ticket #4308 for the associated spackage).

This is an adaptation of the module real_mpfr and of ComplexField and ComplexNumber classes. It adds a class MPComplexField with precision (common to both part) and rounding modes (specific to each part) and a class MPComplexNumber.

This first attempt implements only the complex arithmetic.

The test suite does fail due to coercion problems I can't solve.

CC: @robertwb @williamstein @mwhansen @sagetrac-mvngu @haraldschilly @nexttime

Component: basic arithmetic

Author: Philippe Theveny, Alex Ghitza, Yann Laigle-Chapuy

Reviewer: William Stein, David Kirkby, Paul Zimmermann, Mitesh Patel

Merged: sage-4.6.alpha2

Issue created by migration from https://trac.sagemath.org/ticket/4446

@sagetrac-thevenyp
Copy link
Mannequin Author

sagetrac-thevenyp mannequin commented Nov 5, 2008

Attachment: complex_mpc.patch.gz

@sagetrac-mabshoff sagetrac-mabshoff mannequin added this to the sage-3.2.1 milestone Nov 8, 2008
@aghitza
Copy link

aghitza commented Nov 22, 2008

Attachment: trac4446-complex_mpc.patch.gz

replace the previous patch (rebase against 3.2)

@aghitza
Copy link

aghitza commented Nov 22, 2008

comment:2

There seems to have been some bitrot due to recent changes in Sage. I have uploaded a very slightly modified version of Philippe's patch, which applies cleanly against 3.2. A number of doctests fail for various reasons. I will try to look into this soon.

@sagetrac-thevenyp
Copy link
Mannequin Author

sagetrac-thevenyp mannequin commented Dec 4, 2008

Attachment: complex_mpc.p0.patch.gz

coercion problems resolved, more functions

@sagetrac-thevenyp
Copy link
Mannequin Author

sagetrac-thevenyp mannequin commented Dec 4, 2008

comment:3

The coercion problems have been solved, all doctests now succeed in new version. The whole set of mpc functions involving complex numbers is now in the interface.

@aghitza
Copy link

aghitza commented Dec 5, 2008

apply after complex_mpc.p0.patch

@aghitza
Copy link

aghitza commented Dec 5, 2008

comment:4

Attachment: trac4446_fix.patch.gz

Philippe,

Great work! I'll do my best to review this for 3.2.2. Right now I notice that the patch doesn't work in 3.2.1 because of #4580. I'm attaching a tiny patch that fixes that (should be applied after complex_mpc.p0.patch.

@aghitza
Copy link

aghitza commented Dec 6, 2008

comment:5

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:

[ghitza@artin 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.

@aghitza aghitza changed the title New module complex_mpc using lib mpc for complex multiprecision arithmetic [needs more doctests] New module complex_mpc using lib mpc for complex multiprecision arithmetic Dec 6, 2008
@aghitza
Copy link

aghitza commented Dec 11, 2008

apply after complex_mpc.p0.patch and trac4446_fix.patch

@aghitza
Copy link

aghitza commented Dec 11, 2008

comment:7

Attachment: trac4446_doctests.patch.gz

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

@aghitza aghitza changed the title [needs more doctests] New module complex_mpc using lib mpc for complex multiprecision arithmetic New module complex_mpc using lib mpc for complex multiprecision arithmetic Dec 11, 2008
@sagetrac-thevenyp
Copy link
Mannequin Author

sagetrac-thevenyp mannequin commented Dec 18, 2008

Attachment: trac4446_norm.patch.gz

@sagetrac-thevenyp
Copy link
Mannequin Author

sagetrac-thevenyp mannequin commented Dec 18, 2008

comment:8

One more patch trac4446_norm.patch with:

  • Alex Ghitza listed in authors list and copyright notice

  • complex_mpc uses a copy of mpfr rounding mode list instead of its private one

  • the __abs__ and norm documentation has been improved.

@williamstein
Copy link
Contributor

comment:9

REFEREE REPORT:

  1. How can this be optional? If the patch is applied then this is included:
 	625	    Extension('sage.rings.complex_mpc', 
 	626	              sources = ['sage/rings/complex_mpc.pyx'], 
 	627	              libraries = ['mpc', 'mpfr', 'gmp']), \ 
 	628	

So the only way I can see this going in like this is if it is standard. Am I missing something (probably)?

  1. Timings on Xeon 2.6Ghz (sage.math). Multiplication is faster with mpc, but addition is significantly slower:
sage: K = MPComplexField(53)
sage: a = K(3.3902384)
sage: b = CC(3.3902384)

sage: timeit('a*a')
625 loops, best of 3: 376 ns per loop
sage: timeit('b*b')
625 loops, best of 3: 466 ns per loop

sage: timeit('a+a')
625 loops, best of 3: 368 ns per loop
sage: timeit('b+b')
625 loops, best of 3: 304 ns per loop

  1. Powering doesn't work for mpc but it does for the current CC:
sage: a**a 
boom
  1. Default rounding on coercion (or something?!) is different between MPC and CC:
sage: MPComplexField(100)(3.3902384)
3.3902383999999998742680418218 + 0.00000000000000000000000000000*I
sage: ComplexField(100)(3.3902384)
3.3902384000000000000000000000
  1. With higher precision and nontrivial imaginary part, the timings are all in favor of the existing ComplexField already in Sage:
sage: K = MPComplexField(1000)
sage: a = K(3.3902384,9203483)
sage: b = ComplexField(1000)(3.3902384,9203483)
sage: a
3.39023839999999987426804182177875190973281860351562500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + 9.20348300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e6*I
sage: b
3.39023840000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + 9.20348300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e6*I
sage: timeit('a*a')
625 loops, best of 3: 2.27 µs per loop
sage: timeit('b*b')
625 loops, best of 3: 2.2 µs per loop
sage: timeit('a+a')
625 loops, best of 3: 515 ns per loop
sage: timeit('b+b')
625 loops, best of 3: 445 ns per loop
sage: timeit('a.sin()')
^P625 loops, best of 3: 221 µs per loop
sage: timeit('b.sin()')
625 loops, best of 3: 130 µs per loop

Thus until the above issues are addressed, I see no point in mpc going into sage.

@zimmermann6
Copy link

Attachment: complex_mpc.pxd.gz

@zimmermann6
Copy link

Attachment: complex_mpc.pyx.gz

@zimmermann6
Copy link

Attachment: mpc.patch.gz

Attachment: mpc.pxi.gz

@zimmermann6
Copy link

comment:10

Philippe Theveny, who had a 2-year contract with us, just left, thus he won't be able to continue working on this. In case somebody wants to pursue his work,
he has left the attached files. You need mpc-0.6 available at http://www.loria.fr/~thevenyp/mpc-0.6.spkg. According to Philippe, the performance was improved,
but still not as good as the current CC (but more reliable due to correct rounding).

@sagetrac-ylchapuy
Copy link
Mannequin

sagetrac-ylchapuy mannequin commented Dec 22, 2009

Attachment: mpc-0.8.1.patch.gz

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Jul 12, 2010

comment:48

Replying to @zimmermann6:

I have filled in the author field.

BTW, what are the prequesites for this package?

MPC only depends on GMP and MPFR, which are standard Sage packages.

But you still need to create an spkg/install and spkg/standard/deps for this to be a standard package. I would attach them to the ticket.

You really need to convince William.

ok, then William please could you review this ticket? I change it to needs review since it seems
all requested information has been given.

Dave

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Aug 2, 2010

comment:49

Replying to @sagetrac-drkirkby:

Replying to @zimmermann6:

I have filled in the author field.

BTW, what are the prequesites for this package?

MPC only depends on GMP and MPFR, which are standard Sage packages.

But you still need to create an spkg/install and spkg/standard/deps for this to be a standard package. I would attach them to the ticket.

Paul,
did you do any more on this? There seems to be four things needed here

  • update spkg/install, to have something like
MPC=`$newest mpc`
export MPC
  • update spkg/standard/deps to have something like
all: $(BASE) \
   $(INST)/$(ATLAS)
...
   $(INST)/$(MPC))
...
   $(INST)/$(ZODB)
  • Update spkg/standard/deps so it also has a line like this.
$(INST)/$(MPC): $(BASE) $(INST)/$(MPIR) $(INST)/$(MPFR)
        $(INSTALL) "$(SAGE_SPKG) $(MPC) 2>&1" "tee -a $(SAGE_LOGS)/$(MPC).log"

Dave

@sagetrac-ylchapuy
Copy link
Mannequin

sagetrac-ylchapuy mannequin commented Aug 12, 2010

apply only this patch

@sagetrac-ylchapuy
Copy link
Mannequin

sagetrac-ylchapuy mannequin commented Aug 12, 2010

comment:50

Attachment: trac4446-optional_mpc-sage4.5.2based.patch.gz

This ticket is already too long, but here is another rebased version:

@zimmermann6
Copy link

comment:51

Dave,

Paul,
did you do any more on this? There seems to be four things needed here [...]

this should be the very first thing to do, before we invest more time in this ticket. William, are you out there?

Paul

@williamstein
Copy link
Contributor

comment:52

I'm "out there". Is it necessary and not slower than what is in Sage already? I'm willing to take your (=Paul's) word for it, assuming you say you've done some benchmarks. Also, rounding might be (vastly) better in mpc, which would be another point in its favor.

@zimmermann6
Copy link

comment:53

Replying to @williamstein:

I'm "out there". Is it necessary and not slower than what is in Sage already? I'm willing to take your (=Paul's) word for it, assuming you say you've done some benchmarks. Also, rounding might be (vastly) better in mpc, which would be another point in its favor.

William, here are some results of benchmarks I've done on my Core 2 Duo laptop, with Sage 4.5.3,
with Yann latest patch and the associate spkg. Efficiency:

sage: K = MPComplexField(53)
sage: a = K(3.3902384+1.23456789*i)
sage: b = CC(3.3902384+1.23456789*i)
sage: timeit('a*a')
625 loops, best of 3: 1.03 µs per loop
sage: timeit('b*b')
625 loops, best of 3: 1.08 µs per loop # CC is slower
sage: timeit('a+a')
625 loops, best of 3: 566 ns per loop
sage: timeit('b+b')
625 loops, best of 3: 571 ns per loop # CC is slower

sage: K=MPComplexField(1000)
sage: a = K(3.3902384,9203483)
sage: b = ComplexField(1000)(3.3902384,9203483)
sage: timeit('a*a')
625 loops, best of 3: 3.26 µs per loop
sage: timeit('b*b')
625 loops, best of 3: 2.99 µs per loop # CC is slightly faster
sage: timeit('a+a')
625 loops, best of 3: 680 ns per loop
sage: timeit('b+b')
625 loops, best of 3: 694 ns per loop # CC is slower
sage: timeit('a.sin()')
625 loops, best of 3: 294 µs per loop
sage: timeit('b.sin()')
625 loops, best of 3: 343 µs per loop # CC is slower

sage: timeit('a+17')
625 loops, best of 3: 2.56 µs per loop
sage: timeit('b+17')
625 loops, best of 3: 3.02 µs per loop # CC is slower

sage: a2=a+17
sage: b2=b+17
sage: timeit('a/a2')
625 loops, best of 3: 30.3 µs per loop
sage: timeit('b/b2')
625 loops, best of 3: 14.6 µs per loop

sage: timeit('a.real()')
625 loops, best of 3: 854 ns per loop
sage: timeit('b.real()')
625 loops, best of 3: 5.13 µs per loop

sage: timeit('a.conjugate()')
625 loops, best of 3: 736 ns per loop
sage: timeit('b.conjugate()')
625 loops, best of 3: 750 ns per loop
sage: timeit('a.argument()')
625 loops, best of 3: 146 µs per loop
sage: timeit('b.argument()')
625 loops, best of 3: 155 µs per loop

sage: timeit('a**12345')
625 loops, best of 3: 126 µs per loop
sage: timeit('b**12345')
625 loops, best of 3: 176 µs per loop

sage: timeit('a.log()')
625 loops, best of 3: 315 µs per loop
sage: timeit('b.log()')
625 loops, best of 3: 400 µs per loop

sage: timeit('a.exp()')
625 loops, best of 3: 221 µs per loop
sage: timeit('b.exp()')
625 loops, best of 3: 211 µs per loop

For the accuracy, I've computed the maximal relative error on the real or imaginary part after
1000 random tries for several operations. My program also prints the inputs that give the
corresponding maximal error:

multiplication:
sage: foo(53) # 53 bits
MPC:  1.09250136812570e-16 (-0.199676992382071 - 0.194223361415138*I, 0.9413020\
06592817 + 0.645200777306369*I)
CC:   1.32263143752823e-14 (0.834168924383086 - 0.525629438090125*I, -0.4766533\
42074290 + 0.752454804563813*I)
sage: foo(100) # 100 bits
MPC:  7.83034842148009e-31 (-0.43034701147206399980669837638 - 0.81582963965013\
399110093432939*I, -0.83969050263610625199834532314 + 0.17390362688794167984134\
423048*I)
CC:   9.28509698731955e-29 (-0.36479911591428496460512307920 + 0.22548928494028\
018164534780632*I, -0.49018610148599010061638163259 - 0.30229330441199619133786\
980680*I)

division:
sage: foo(53)
MPC:  1.08485488717363e-16 (0.906903106647522 + 0.991328300040510*I, 0.26885465\
0418765 - 0.188551687646414*I)
CC:   4.27558190140949e-13 (-0.947451505768202 - 0.424071772860430*I, -0.499313\
865619141 - 0.223444662259920*I)
sage: foo(100)
MPC:  7.66357970552281e-31 (0.92755016191057837385980632404 - 0.004266231128213\
8322794515257916*I, 0.14072961243734751540073515895 - 0.21101836467335963334809\
014965*I)
CC:   1.06937889944401e-27 (-0.41008840630275384495897016614 + 0.43420284734725\
368743056683764*I, -0.61829368333881933443455346326 - 0.58354470182146315365872\
353144*I)

sqrt:
sage: foo(53)
MPC:  1.09880191814582e-16 (-0.621894659027438 - 0.0246731753089378*I, 0.823805\
504837539 - 0.981310087843700*I)
CC:   2.08688816342048e-16 (0.968316682679636 + 0.637686286592402*I, -0.2999297\
58140749 + 0.680399103485303*I)
sage: foo(100)
MPC:  7.83762497864303e-31 (0.87484855451536280543412317489 + 0.744936094843967\
94278935970162*I, -0.93716227305934196720704783450 - 0.765294741452728993051615\
69068*I)
CC:   1.59191232901277e-30 (0.22724304905610094307701469163 + 0.290884560229311\
05826353325335*I, -0.44728415428244253958062250934 + 0.959404399673905010209671\
68949*I)

exp:
sage: foo(53)
MPC:  1.08513702552684e-16 (0.801188951612012 - 0.440834327392402*I, -0.6487549\
15945509 - 0.558408459317570*I)
CC:   2.56306731927053e-16 (-0.534146492930164 - 0.126305922104917*I, -0.525552\
199671560 + 0.0746660767007601*I)
sage: foo(100)
MPC:  7.85000220770852e-31 (-0.25871533881495460870167038331 + 0.70802010475507\
807939080332669*I, 0.99833000148645085071979336755 + 0.103046934118108408058895\
43882*I)
CC:   2.02731881365962e-30 (0.033507794108965175610485564405 + 0.53119476356929\
639125934355035*I, 0.46545588987697950055582059300 + 0.896373882394705924442797\
08331*I)

log:
sage: foo(53)
MPC:  1.09778133774750e-16 (-0.391618732071762 + 0.824073966701766*I, 0.3486864\
59442427 - 0.191201122946134*I)
CC:   6.10819034602284e-14 (0.306684274970498 + 0.953229884394732*I, 0.69862405\
1151183 + 0.276699733597418*I)
sage: foo(100)
MPC:  7.78374256155462e-31 (0.50154056740914466911692379172 + 0.796641256036122\
24316946320184*I, -0.76918900642484651661867461393 - 0.286514343536794358035934\
91438*I)
CC:   6.82825438431515e-28 (-0.13721125119514449776575251187 + 0.99010163436560\
678238821778034*I, 0.92169332492985590698251634723 + 0.433132422276759879534575\
89642*I)

sin:
sage: foo(53)
MPC:  1.08720457020742e-16 (-0.369315245123802 + 0.854572675318644*I, 0.8169569\
42853907 - 0.383919250130617*I)
CC:   2.59601650874087e-16 (-0.546197856444743 - 0.534628610514192*I, 0.3036961\
63087668 - 0.231790426712382*I)
sage: foo(100)
MPC:  7.55871247471999e-31 (0.20947476591320905500539204843 - 0.626588978693616\
08926271268655*I, -0.55364821811403565597840750754 + 0.743341403117384889712851\
11372*I)
CC:   1.72458459418951e-30 (0.42758001678856166974028750611 - 0.923412131000390\
51795327859750*I, -0.99149234221470907346167026703 - 0.690427397584128136419461\
37603*I)

cos:
sage: foo(53)
MPC:  1.08584899379431e-16 (0.0646782540849349 - 0.111085748624151*I, 0.4701880\
86702821 + 0.252843262283133*I)
CC:   2.85959441825441e-16 (0.0850486257569383 - 0.330860565935531*I, 0.0564130\
612472886 + 0.0847664237260943*I)
sage: foo(100)
MPC:  7.78394156732906e-31 (0.93946166432029710121550615978 - 0.592139906105641\
30050851821134*I, 0.53601265027477876871715914306 - 0.1322166340317310632649551\
5769*I)
CC:   1.94260689254542e-30 (-0.55385187621901359297440670364 + 0.50415610417338\
788296133563973*I, -0.13371850315082336799522666801 - 0.96241946806142646000989\
112726*I)

I used the following programs:

def check(res,ref):
   if ref.real() == 0.0:
      if res.real() <> 0.0:
         err_real = +Infinity
      else:
         err_real = 0.0
   else:
      err_real = RR((res.real()-ref.real()).abs()/ref.real().abs())
   if ref.imag() == 0.0:
      if res.imag() <> 0.0:
         err_imag = +Infinity
      else:
         err_imag = 0.0
   else:
      err_imag = RR((res.imag()-ref.imag()).abs()/ref.imag().abs())
   return max(err_real,err_imag)

def foo(p):
   K=MPComplexField(p)
   L=ComplexField(p)
   K2=MPComplexField(p+20)
   L2=ComplexField(p+20)
   max_erra = 0
   max_errb = 0
   ina = 0
   inb = 0
   for i in range(10^3):
      b = L.random_element()
      br = b.real()
      bi = b.imag()
      a = K(b)
      c = L.random_element()
      cr = b.real()
      ci = b.imag()
      d = K(c)
      aa=cos(a) # change to a*d for multiplication
      bb=cos(b) # change to b*c for multiplication
      ref = cos(K2(a)) # change to K2(a)*K2(d) for multiplication
      erra = check(K2(aa),ref)
      errb = check(K2(bb),ref)
      if erra > max_erra:
         max_erra = erra
         ina = a, d
      if errb > max_errb:
         max_errb = errb
         inb = b, c
   print "MPC: ", max_erra, ina
   print "CC:  ", max_errb, inb

The conclusion is that MPC is in the majority of the cases faster than ComplexField (the only
exception being the division) and always more accurate, with a ratio of a factor up to
3941 (i.e., about 12 bits) for the 53-bit division.

For MPC we observe that the maximal relative error is --- as guaranteed by MPC --- always less than 1/2 ulp (unit in last place) which corresponds to a relative error of 2**(-p), i.e., 1.12e-16 for p=53 and 7.89e-31 for p=100.

I thus give a positive review to Yann's patch.

Paul

@zimmermann6
Copy link

Changed reviewer from William Stein, David Kirkby to William Stein, David Kirkby, Paul Zimmermann

@qed777
Copy link
Mannequin

qed777 mannequin commented Sep 29, 2010

comment:54

Replying to @sagetrac-ylchapuy:

  • this is intended to make mpc an optional spkg. The complex_mpc module won't be compiled if the spkg is not installed.

After applying the patch but not installing the optional package, I get

        sage -t -long  devel/sage/sage/rings/complex_mpc.pyx # 454 doctests failed

Should all of the tests in complex_mpc.pyx be tagged with #optional - mpc (see this section of the developer guide)? (I don't know if there's a easier way.) Or am I mistaken?

@qed777 qed777 mannequin added s: needs work and removed s: positive review labels Sep 29, 2010
@qed777
Copy link
Mannequin

qed777 mannequin commented Sep 29, 2010

comment:55

Or one of

  • # optional - mpc
  • # optional - Mpc
  • # optional - MPC

etc.

@sagetrac-ylchapuy
Copy link
Mannequin

sagetrac-ylchapuy mannequin commented Sep 29, 2010

comment:56

Yes sorry, my mistake.

I won't be able to add this before next week, so if someone motivated beats me... (Paul?)

@sagetrac-ylchapuy
Copy link
Mannequin

sagetrac-ylchapuy mannequin commented Sep 29, 2010

Attachment: trac4446-mark_doctests_optional.patch.gz

@sagetrac-ylchapuy
Copy link
Mannequin

sagetrac-ylchapuy mannequin commented Sep 29, 2010

comment:57

I guess nobody has beaten me...
I had no time, but here it is. All doctests are now marked "# optional - Mpc'

I hope I choose the good version, it's the one used one the Mpc library web page.

Back to the stuff I have to do, I'm late now...

   Yann

@zimmermann6
Copy link

comment:58

with the last patch (to be applied after the previous one), I get before installing the optional
package:

tarte% ./sage -t -long  devel/sage/sage/rings/complex_mpc.pyx
sage -t -long "devel/sage/sage/rings/complex_mpc.pyx"       
         [2.1 s]
 
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 2.1 seconds

and after installing it:

tarte% ./sage -t -long devel/sage/sage/rings/complex_mpc.pyx
sage -t -long "devel/sage/sage/rings/complex_mpc.pyx"       
         [1.7 s]
 
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 1.7 seconds

Paul

@zimmermann6
Copy link

Changed reviewer from William Stein, David Kirkby, Paul Zimmermann to William Stein, David Kirkby, Paul Zimmermann, Mitesh Patel

@qed777
Copy link
Mannequin

qed777 mannequin commented Sep 29, 2010

comment:59

Thanks! With the package and patch installed, I get no errors with

./sage -t -long -only-optional=mpc "devel/sage/sage/rings/complex_mpc.pyx"
./sage -t -long -optional "devel/sage/sage/rings/complex_mpc.pyx"

@qed777
Copy link
Mannequin

qed777 mannequin commented Sep 29, 2010

comment:60

Harald, Mike, or Minh, could one of you please add

http://yann.laiglechapuy.net/spkg/mpc-0.8.3-dev-svn793.spkg

to the optional spkg repository?

@qed777
Copy link
Mannequin

qed777 mannequin commented Sep 29, 2010

Merged: sage-4.6.alpha2

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 30, 2010

comment:62

Replying to @qed777:

Harald, Mike, or Minh, could one of you please add

http://yann.laiglechapuy.net/spkg/mpc-0.8.3-dev-svn793.spkg

to the optional spkg repository?

Done. See the optional spkg repository at

http://www.sagemath.org/packages/optional/

@qed777
Copy link
Mannequin

qed777 mannequin commented Sep 30, 2010

comment:63

Thanks, Minh.

@qed777 qed777 mannequin removed the s: positive review label Sep 30, 2010
@qed777 qed777 mannequin closed this as completed Sep 30, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants