# Elliptic Curve Rank Presentation

## 3281 days ago by rkeaton

#Rodney Keaton and Dania Zantout

<p>The following function is an implementation of a naive algorithm proposed by J. Achter. It is designed to calculate the rank of an elliptic curve of the form </p>
<p>$y^2=x^3+ax^2+bx.$</p>

The following function is an implementation of a naive algorithm proposed by J. Achter.

It is designed to calculate the rank of an elliptic curve of the form $y^2=x^3+ax^2+bx$.

def ECRank(a,b): QQ(a) QQ(b) r = rnk(a,b) rbar = rnkbar(a,b) return r*rbar/2-1 def rnk(a,b): x = QQ['x0,x1,x2'].gens() candidates = b.squarefree_part().factor() image = [] for b1 in candidates: b2 = b/b1 poly = b1*x^4+a*x^2*x^2+b2*x^4-x^2 for u in range(-100,100): for v in range(-100,100): for w in range(-100,100): if poly(u,v,w) == 0: image.append(b1) break if poly(u,v,w) == 0: break if poly(u,v,w) == 0: break return len(image)+1 def rnkbar(a,b): x = QQ['x0,x1,x2'].gens() abar = -2*a bbar = a^2-4*b candidates = bbar.squarefree_part().factor() image = [] for b1 in candidates: b2 = bbar/b1 poly = b1*x^4+abar*x^2*x^2+b2*x^4-x^2 for u in range(-100,100): for v in range(-100,100): for w in range(-100,100): if poly(u,v,w) == 0: image.append(b1) break if poly(u,v,w) == 0: break if poly(u,v,w) == 0: break return len(image)+1

Let's run a test with the curve $y^2=x^3+x^2+x$.

ECRank(1,1)
 0 0
timeit('ECRank(1,1)')
 25 loops, best of 3: 14.3 ms per loop 25 loops, best of 3: 14.3 ms per loop
E=EllipticCurve([0,1,0,1,0]) E.rank()
 0 0

So, we obtained the correct rank in this case.

Now, let's try a curve with a higher rank, say $y^2=x^3+x^2+3x$.

timeit('E.rank()')
 625 loops, best of 3: 4.45 µs per loop 625 loops, best of 3: 4.45 µs per loop

So, we obtain the correct rank in this case.

Now, let's try a curve with a higher rank, say $y^2=x^3+x^2+2x$.

ECRank(1,2)
 1 1

This took somewhere around 20 minutes to complete.

E=EllipticCurve([0,1,0,2,0]) E.rank()
 1 1

At least we got the right answer.

timeit('E.rank()')
 625 loops, best of 3: 4.47 µs per loop 625 loops, best of 3: 4.47 µs per loop

Why is this so fast?

There are efficient ways of computing lower and upper bounds, and when they match, SAGE returns this as the rank.

print 'Upper Bound:',E.rank_bound() print 'Lower Bound:',E.simon_two_descent()
 Upper Bound: 1 Lower Bound: 1 Upper Bound: 1 Lower Bound: 1

Now, lets compare some of the algorithms that SAGE has built in to compute the rank.

RANK 0

E=EllipticCurve([0,1,0,1,0])
timeit("E.analytic_rank(algorithm='rubinstein')",number=1)
  *** Warning: new stack size = 1001568 (0.955 Mbytes). *** Warning: new stack size = 1001568 (0.955 Mbytes). *** Warning: new stack size = 1001568 (0.955 Mbytes). 1 loops, best of 3: 18.7 ms per loop  *** Warning: new stack size = 1001568 (0.955 Mbytes). *** Warning: new stack size = 1001568 (0.955 Mbytes). *** Warning: new stack size = 1001568 (0.955 Mbytes). 1 loops, best of 3: 18.7 ms per loop
timeit("E.analytic_rank(algorithm='sympow')",number=1)
 1 loops, best of 3: 34.2 ms per loop 1 loops, best of 3: 34.2 ms per loop
timeit("E.analytic_rank(algorithm='pari')",number=1)
 1 loops, best of 3: 274 µs per loop 1 loops, best of 3: 274 µs per loop
timeit('E.rank()')
 625 loops, best of 3: 4.15 µs per loop 625 loops, best of 3: 4.15 µs per loop

RANK 1

E=EllipticCurve([0,1,0,2,0])
timeit("E.analytic_rank(algorithm='rubinstein')",number=1)
  *** Warning: new stack size = 1002672 (0.956 Mbytes). *** Warning: new stack size = 1002672 (0.956 Mbytes). *** Warning: new stack size = 1002672 (0.956 Mbytes). 1 loops, best of 3: 19.5 ms per loop  *** Warning: new stack size = 1002672 (0.956 Mbytes). *** Warning: new stack size = 1002672 (0.956 Mbytes). *** Warning: new stack size = 1002672 (0.956 Mbytes). 1 loops, best of 3: 19.5 ms per loop
timeit("E.analytic_rank(algorithm='sympow')",number=1)
 1 loops, best of 3: 34.2 ms per loop 1 loops, best of 3: 34.2 ms per loop
timeit("E.analytic_rank(algorithm='pari')",number=1)
 1 loops, best of 3: 2.59 ms per loop 1 loops, best of 3: 2.59 ms per loop
timeit('E.rank()')
 625 loops, best of 3: 4.17 µs per loop 625 loops, best of 3: 4.17 µs per loop

RANK 2

E=EllipticCurve([0,1,1,-2,0])
timeit("E.analytic_rank(algorithm='rubinstein')",number=1)
  *** Warning: new stack size = 1003360 (0.957 Mbytes). *** Warning: new stack size = 1003360 (0.957 Mbytes). *** Warning: new stack size = 1003360 (0.957 Mbytes). 1 loops, best of 3: 21.3 ms per loop  *** Warning: new stack size = 1003360 (0.957 Mbytes). *** Warning: new stack size = 1003360 (0.957 Mbytes). *** Warning: new stack size = 1003360 (0.957 Mbytes). 1 loops, best of 3: 21.3 ms per loop
timeit("E.analytic_rank(algorithm='sympow')",number=1)
 1 loops, best of 3: 42.3 ms per loop 1 loops, best of 3: 42.3 ms per loop
timeit("E.analytic_rank(algorithm='pari')",number=1)
 1 loops, best of 3: 6.5 ms per loop 1 loops, best of 3: 6.5 ms per loop
timeit("E.rank()",number=1)
 1 loops, best of 3: 9.06 µs per loop 1 loops, best of 3: 9.06 µs per loop

RANK 3

E=EllipticCurve([0,0,1,-7,6])
timeit("E.analytic_rank(algorithm='rubinstein')",number=1)
  *** Warning: new stack size = 1010496 (0.964 Mbytes). *** Warning: new stack size = 1010496 (0.964 Mbytes). *** Warning: new stack size = 1010496 (0.964 Mbytes). 1 loops, best of 3: 24.3 ms per loop  *** Warning: new stack size = 1010496 (0.964 Mbytes). *** Warning: new stack size = 1010496 (0.964 Mbytes). *** Warning: new stack size = 1010496 (0.964 Mbytes). 1 loops, best of 3: 24.3 ms per loop
timeit("E.analytic_rank(algorithm='sympow')",number=1)
 1 loops, best of 3: 40.5 ms per loop 1 loops, best of 3: 40.5 ms per loop
timeit("E.analytic_rank(algorithm='pari')",number=1)
 1 loops, best of 3: 23.6 ms per loop 1 loops, best of 3: 23.6 ms per loop
timeit("E.rank()",number=1)
 1 loops, best of 3: 9.06 µs per loop 1 loops, best of 3: 9.06 µs per loop

RANK 4

E=EllipticCurve([1,-1,0,-79,289])
timeit("E.analytic_rank(algorithm='rubinstein')",number=1)
  *** Warning: new stack size = 1067712 (1.018 Mbytes). *** Warning: new stack size = 1067712 (1.018 Mbytes). *** Warning: new stack size = 1067712 (1.018 Mbytes). 1 loops, best of 3: 57.3 ms per loop  *** Warning: new stack size = 1067712 (1.018 Mbytes). *** Warning: new stack size = 1067712 (1.018 Mbytes). *** Warning: new stack size = 1067712 (1.018 Mbytes). 1 loops, best of 3: 57.3 ms per loop
timeit("E.analytic_rank(algorithm='sympow')",number=1)
 1 loops, best of 3: 47.1 ms per loop 1 loops, best of 3: 47.1 ms per loop
timeit("E.analytic_rank(algorithm='pari')",number=1)
 1 loops, best of 3: 171 ms per loop 1 loops, best of 3: 171 ms per loop
timeit("E.rank()",number=1)
 1 loops, best of 3: 7.87 µs per loop 1 loops, best of 3: 7.87 µs per loop

RANK 5

E=EllipticCurve([0,0,1,-79,342])
timeit("E.analytic_rank(algorithm='rubinstein')",number=1)
  *** Warning: new stack size = 1786816 (1.704 Mbytes). *** Warning: new stack size = 1786816 (1.704 Mbytes). *** Warning: new stack size = 1786816 (1.704 Mbytes). 1 loops, best of 3: 561 ms per loop  *** Warning: new stack size = 1786816 (1.704 Mbytes). *** Warning: new stack size = 1786816 (1.704 Mbytes). *** Warning: new stack size = 1786816 (1.704 Mbytes). 1 loops, best of 3: 561 ms per loop
timeit("E.analytic_rank(algorithm='sympow')",number=1)
 /usr/local/sage/local/bin/sympow: line 3: 46927 Segmentation fault (core dumped) ./sympow $* Traceback (click to the left of this block for traceback) ... RuntimeError: failed to compute analytic rank /usr/local/sage/local/bin/sympow: line 3: 46927 Segmentation fault (core dumped) ./sympow$* Traceback (most recent call last): File "", line 1, in File "_sage_input_60.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("dGltZWl0KCJFLmFuYWx5dGljX3JhbmsoYWxnb3JpdGhtPSdzeW1wb3cnKSIsbnVtYmVyPTEp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in File "/tmp/tmpXrbeP9/___code___.py", line 3, in exec compile(u'timeit("E.analytic_rank(algorithm=\'sympow\')",number=_sage_const_1 ) File "", line 1, in File "sage_timeit_class.pyx", line 82, in sage.misc.sage_timeit_class.SageTimeit.__call__ (sage/misc/sage_timeit_class.c:744) File "sage_timeit_class.pyx", line 59, in sage.misc.sage_timeit_class.SageTimeit.eval (sage/misc/sage_timeit_class.c:605) File "/usr/local/sage/local/lib/python2.6/site-packages/sage/misc/sage_timeit.py", line 184, in sage_timeit best = min(timer.repeat(repeat, number)) / number File "/usr/local/sage/local/lib/python/timeit.py", line 220, in repeat t = self.timeit(number) File "/usr/local/sage/local/lib/python/timeit.py", line 193, in timeit timing = self.inner(it, self.timer) File "", line 6, in inner File "/usr/local/sage/local/lib/python2.6/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 1373, in analytic_rank return sympow.analytic_rank(self) File "/usr/local/sage/local/lib/python2.6/site-packages/sage/lfunctions/sympow.py", line 287, in analytic_rank raise RuntimeError, "failed to compute analytic rank" RuntimeError: failed to compute analytic rank
timeit("E.analytic_rank(algorithm='pari')",number=1)
 1 loops, best of 3: 1.77 s per loop 1 loops, best of 3: 1.77 s per loop
timeit("E.rank()",number=1)
 1 loops, best of 3: 9.06 µs per loop 1 loops, best of 3: 9.06 µs per loop

RANK 6

E=EllipticCurve([1,1,0,-2582,48720])
timeit("E.analytic_rank(algorithm='rubinstein')",number=1)
  *** Warning: new stack size = 13975616 (13.328 Mbytes). *** Warning: new stack size = 13975616 (13.328 Mbytes). *** Warning: new stack size = 13975616 (13.328 Mbytes). 1 loops, best of 3: 9.03 s per loop  *** Warning: new stack size = 13975616 (13.328 Mbytes). *** Warning: new stack size = 13975616 (13.328 Mbytes). *** Warning: new stack size = 13975616 (13.328 Mbytes). 1 loops, best of 3: 9.03 s per loop
timeit("E.analytic_rank(algorithm='pari')",number=1)
 1 loops, best of 3: 35.1 s per loop 1 loops, best of 3: 35.1 s per loop
timeit("E.rank()",number=1)
 1 loops, best of 3: 8.82 µs per loop 1 loops, best of 3: 8.82 µs per loop

RANK 7

E=EllipticCurve([0,0,0,-10012,346900])
timeit("E.analytic_rank(algorithm='rubinstein')",number=1)
  *** Warning: new stack size = 112433152 (107.225 Mbytes). *** Warning: new stack size = 112433152 (107.225 Mbytes). *** Warning: new stack size = 112433152 (107.225 Mbytes). 1 loops, best of 3: 57.2 s per loop  *** Warning: new stack size = 112433152 (107.225 Mbytes). *** Warning: new stack size = 112433152 (107.225 Mbytes). *** Warning: new stack size = 112433152 (107.225 Mbytes). 1 loops, best of 3: 57.2 s per loop
timeit("E.analytic_rank(algorithm='pari')",number=1)
 1 loops, best of 3: 186 s per loop 1 loops, best of 3: 186 s per loop
timeit("E.rank()",number=1)
 1 loops, best of 3: 11 µs per loop 1 loops, best of 3: 11 µs per loop

RANK 8

E=EllipticCurve([0,0,1,-23737,960366])
timeit("E.analytic_rank(algorithm='rubinstein')",number=1)
 *** Warning: not enough memory, new stack 18446744073268923520. *** Warning: not enough memory, new stack 9223372036634461760. *** Warning: not enough memory, new stack 4611686018317230880. *** Warning: not enough memory, new stack 2305843009158615440. *** Warning: not enough memory, new stack 1152921504579307720. *** Warning: not enough memory, new stack 576460752289653860. *** Warning: not enough memory, new stack 288230376144826930. *** Warning: not enough memory, new stack 144115188072413465. *** Warning: not enough memory, new stack 72057594036206732. *** Warning: not enough memory, new stack 36028797018103366. *** Warning: not enough memory, new stack 18014398509051683. *** Warning: not enough memory, new stack 9007199254525841. *** Warning: not enough memory, new stack 4503599627262920. *** Warning: not enough memory, new stack 2251799813631460. *** Warning: not enough memory, new stack 1125899906815730. *** Warning: not enough memory, new stack 562949953407865. *** Warning: not enough memory, new stack 281474976703932. *** Warning: not enough memory, new stack 140737488351966. *** Warning: not enough memory, new stack 70368744175983. *** Warning: not enough memory, new stack 35184372087991. *** Warning: not enough memory, new stack 17592186043995. *** Warning: not enough memory, new stack 8796093021997. *** Warning: not enough memory, new stack 4398046510998. *** Warning: not enough memory, new stack 2199023255499. *** Warning: not enough memory, new stack 1099511627749. *** Warning: not enough memory, new stack 549755813874. *** Warning: not enough memory, new stack 274877906937. *** Warning: not enough memory, new stack 137438953468. *** Warning: not enough memory, new stack 68719476734. *** Warning: new stack size = 34359738367 (32768.000 Mbytes). *** bug in PARI/GP (Segmentation Fault), please report Traceback (click to the left of this block for traceback) ... __SAGE__ *** Warning: not enough memory, new stack 18446744073268923520. *** Warning: not enough memory, new stack 9223372036634461760. *** Warning: not enough memory, new stack 4611686018317230880. *** Warning: not enough memory, new stack 2305843009158615440. *** Warning: not enough memory, new stack 1152921504579307720. *** Warning: not enough memory, new stack 576460752289653860. *** Warning: not enough memory, new stack 288230376144826930. *** Warning: not enough memory, new stack 144115188072413465. *** Warning: not enough memory, new stack 72057594036206732. *** Warning: not enough memory, new stack 36028797018103366. *** Warning: not enough memory, new stack 18014398509051683. *** Warning: not enough memory, new stack 9007199254525841. *** Warning: not enough memory, new stack 4503599627262920. *** Warning: not enough memory, new stack 2251799813631460. *** Warning: not enough memory, new stack 1125899906815730. *** Warning: not enough memory, new stack 562949953407865. *** Warning: not enough memory, new stack 281474976703932. *** Warning: not enough memory, new stack 140737488351966. *** Warning: not enough memory, new stack 70368744175983. *** Warning: not enough memory, new stack 35184372087991. *** Warning: not enough memory, new stack 17592186043995. *** Warning: not enough memory, new stack 8796093021997. *** Warning: not enough memory, new stack 4398046510998. *** Warning: not enough memory, new stack 2199023255499. *** Warning: not enough memory, new stack 1099511627749. *** Warning: not enough memory, new stack 549755813874. *** Warning: not enough memory, new stack 274877906937. *** Warning: not enough memory, new stack 137438953468. *** Warning: not enough memory, new stack 68719476734. *** Warning: new stack size = 34359738367 (32768.000 Mbytes). *** bug in PARI/GP (Segmentation Fault), please report ^CTraceback (most recent call last): File "", line 1, in File "_sage_input_99.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("dGltZWl0KCJFLmFuYWx5dGljX3JhbmsoYWxnb3JpdGhtPSdydWJpbnN0ZWluJykiLG51bWJlcj0xKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in File "/tmp/tmpGVvD8B/___code___.py", line 3, in exec compile(u'timeit("E.analytic_rank(algorithm=\'rubinstein\')",number=_sage_const_1 ) File "", line 1, in File "sage_timeit_class.pyx", line 82, in sage.misc.sage_timeit_class.SageTimeit.__call__ (sage/misc/sage_timeit_class.c:744) File "sage_timeit_class.pyx", line 59, in sage.misc.sage_timeit_class.SageTimeit.eval (sage/misc/sage_timeit_class.c:605) File "/usr/local/sage/local/lib/python2.6/site-packages/sage/misc/sage_timeit.py", line 184, in sage_timeit best = min(timer.repeat(repeat, number)) / number File "/usr/local/sage/local/lib/python/timeit.py", line 220, in repeat t = self.timeit(number) File "/usr/local/sage/local/lib/python/timeit.py", line 193, in timeit timing = self.inner(it, self.timer) File "", line 6, in inner File "/usr/local/sage/local/lib/python2.6/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 1366, in analytic_rank return lcalc.analytic_rank(L=self) File "/usr/local/sage/local/lib/python2.6/site-packages/sage/lfunctions/lcalc.py", line 379, in analytic_rank s = self('--rank-compute %s'%L) File "/usr/local/sage/local/lib/python2.6/site-packages/sage/lfunctions/lcalc.py", line 65, in __call__ return os.popen(cmd).read().strip() KeyboardInterrupt __SAGE__
timeit("E.rank()",number=1)
 1 loops, best of 3: 10 µs per loop 1 loops, best of 3: 10 µs per loop
#Rubinstein in Red #Sympow in Blue #Pari in Black #Rank bound method in Green data1 = [(0,0.0187),(1,0.0195), (2,0.0213), (3,0.0243), (4,0.0598)] g1 = Graphics() g1 += point2d(data1,color='red') g1 += line(data1,color='red') data2 = [(0,0.0342),(1,0.0342), (2,0.0423), (3,0.0405), (4,0.0471)] g2 = Graphics() g2 += point2d(data2,color='blue') g2 += line(data2,color='blue') data3 = [(0,0.000274),(1,0.00259), (2,0.0065), (3,0.0236), (4,0.171)] g3 = Graphics() g3 += point2d(data3,color='black') g3 += line(data3,color='black') show(g1+g2+g3)  data1 = [(0,0.0187),(1,0.0195), (2,0.0213), (3,0.0243), (4,0.0598),(5,0.561), (6,9.03), (7,57.2)] g1 = Graphics() g1 += point2d(data1,color='red') g1 += line(data1,color='red') data2 = [(0,0.00000415),(1,0.00000417), (2,0.00000906), (3,0.00000906), (4,0.00000787),(5,0.00000906),(6,0.00000882),(7,0.000011)] g2 = Graphics() g2 += point2d(data2,color='green') g2 += line(data2,color='green') data3 = [(0,0.000274),(1,0.00259), (2,0.0065), (3,0.0236), (4,0.171),(5,1.77),(6,35.1),(7,186)] g3 = Graphics() g3 += point2d(data3,color='black') g3 += line(data3,color='black') show(g1+g2+g3)  What about some cases when the upper and lower bound do not match?

RANK 0

E=EllipticCurve([-1,-1,-1,3,7]) E.rank()
 Unable to compute the rank with certainty (lower bound=0). This could be because Sha(E/Q) is nontrivial. Try calling something like two_descent(second_limit=13) on the curve then trying this command again. You could also try rank with only_use_mwrank=False. Traceback (click to the left of this block for traceback) ... RuntimeError: Rank not provably correct. Unable to compute the rank with certainty (lower bound=0). This could be because Sha(E/Q) is nontrivial. Try calling something like two_descent(second_limit=13) on the curve then trying this command again. You could also try rank with only_use_mwrank=False. Traceback (most recent call last): File "", line 1, in File "_sage_input_43.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("RT1FbGxpcHRpY0N1cnZlKFstMSwtMSwtMSwzLDddKQpFLnJhbmsoKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in File "/tmp/tmp75FKMW/___code___.py", line 4, in exec compile(u'E.rank() File "", line 1, in File "/usr/local/sage/local/lib/python2.6/site-packages/sage/schemes/elliptic_curves/ell_rational_field.py", line 1695, in rank raise RuntimeError, 'Rank not provably correct.' RuntimeError: Rank not provably correct.
timeit("E.analytic_rank(algorithm='rubinstein')",number=1)
  *** Warning: new stack size = 1024848 (0.977 Mbytes). *** Warning: new stack size = 1024848 (0.977 Mbytes). *** Warning: new stack size = 1024848 (0.977 Mbytes). 1 loops, best of 3: 24.7 ms per loop  *** Warning: new stack size = 1024848 (0.977 Mbytes). *** Warning: new stack size = 1024848 (0.977 Mbytes). *** Warning: new stack size = 1024848 (0.977 Mbytes). 1 loops, best of 3: 24.7 ms per loop
timeit("E.analytic_rank(algorithm='sympow')",number=1)
 1 loops, best of 3: 31.4 ms per loop 1 loops, best of 3: 31.4 ms per loop
timeit("E.analytic_rank(algorithm='pari')",number=1)
 1 loops, best of 3: 6.74 ms per loop 1 loops, best of 3: 6.74 ms per loop

RANK 1

E=EllipticCurve([-1,1,0,8,9])
timeit("E.analytic_rank(algorithm='rubinstein')",number=1)
  *** Warning: new stack size = 1028800 (0.981 Mbytes). *** Warning: new stack size = 1028800 (0.981 Mbytes). *** Warning: new stack size = 1028800 (0.981 Mbytes). 1 loops, best of 3: 29.2 ms per loop  *** Warning: new stack size = 1028800 (0.981 Mbytes). *** Warning: new stack size = 1028800 (0.981 Mbytes). *** Warning: new stack size = 1028800 (0.981 Mbytes). 1 loops, best of 3: 29.2 ms per loop
timeit("E.analytic_rank(algorithm='sympow')",number=1)
 1 loops, best of 3: 31.8 ms per loop 1 loops, best of 3: 31.8 ms per loop
timeit("E.analytic_rank(algorithm='pari')",number=1)
 1 loops, best of 3: 32.2 ms per loop 1 loops, best of 3: 32.2 ms per loop

RANK 3

E=EllipticCurve([0,157,0,-160,1])
timeit("E.analytic_rank(algorithm='rubinstein')",number=1)
  *** Warning: new stack size = 13804640 (13.165 Mbytes). *** Warning: new stack size = 13804640 (13.165 Mbytes). *** Warning: new stack size = 13804640 (13.165 Mbytes). 1 loops, best of 3: 4.66 s per loop  *** Warning: new stack size = 13804640 (13.165 Mbytes). *** Warning: new stack size = 13804640 (13.165 Mbytes). *** Warning: new stack size = 13804640 (13.165 Mbytes). 1 loops, best of 3: 4.66 s per loop
timeit("E.analytic_rank(algorithm='sympow')",number=1)
 1 loops, best of 3: 291 ms per loop 1 loops, best of 3: 291 ms per loop
timeit("E.analytic_rank(algorithm='pari')",number=1)
 1 loops, best of 3: 14.3 s per loop 1 loops, best of 3: 14.3 s per loop
data1 = [(0,0.0217),(1,0.0292), (3,4.66)] g1 = Graphics() g1 += point2d(data1,color='red') g1 += line(data1,color='red') data2 = [(0,0.0314),(1,0.0318), (3,0.291)] g2 = Graphics() g2 += point2d(data2,color='blue') g2 += line(data2,color='blue') data3 = [(0,0.00674),(1,0.0322), (3,14.3)] g3 = Graphics() g3 += point2d(data3,color='black') g3 += line(data3,color='black') show(g1+g2+g3)  