Ask Your Question

Revision history [back]

plot() Overflow error int to large to convert to C long

p = 2^256 - 2^32 - 2^9 - 2^8 - 2^7 - 2^6 - 2^4 - 1; E = EllipticCurve(GF(p), [0,0,0,0,7]); plot(E)

PRoduces output

``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_54.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("cGxvdChFKQ=="),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>

File "/tmp/tmp1ZsAfB/___code___.py", line 2, in <module> exec compile(u'plot(E) File "", line 1, in <module>

File "/opt/SageMath/local/lib/python2.7/site-packages/sage/misc/decorators.py", line 564, in wrapper return func(args, *options) File "/opt/SageMath/local/lib/python2.7/site-packages/sage/plot/plot.py", line 1930, in plot G = funcs.plot(args, *original_opts) File "/opt/SageMath/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_finite_field.py", line 113, in plot G += plot.points([P[0:2] for P in self.points() if not P.is_zero()], args, *kwds) File "/opt/SageMath/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_finite_field.py", line 214, in points v = self._points_via_group_structure() File "/opt/SageMath/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_finite_field.py", line 156, in _points_via_group_structure for m in range(1,ni[0]): OverflowError: Python int too large to convert to C long ```

plot() Overflow error int to large to convert to C long

The following code

 p = 2^256 - 2^32 - 2^9 - 2^8 - 2^7 - 2^6 - 2^4 - 1;
1
E = EllipticCurve(GF(p), [0,0,0,0,7]);
[0,0,0,0,7])
plot(E)

produces the following error:

PRoduces output

```

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_54.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -- -*- coding: utf-8 --\n" -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("cGxvdChFKQ=="),globals())+"\n"); _support_.preparse_worksheet_cell(base64.b64decode("cGxvdChFKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>

<module> File "/tmp/tmp1ZsAfB/___code___.py", line 2, in <module> exec compile(u'plot(E) File "", line 1, in <module>

<module> File "/opt/SageMath/local/lib/python2.7/site-packages/sage/misc/decorators.py", line 564, in wrapper return func(args, *options) func(*args, **options) File "/opt/SageMath/local/lib/python2.7/site-packages/sage/plot/plot.py", line 1930, in plot G = funcs.plot(args, *original_opts) funcs.plot(*args, **original_opts) File "/opt/SageMath/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_finite_field.py", line 113, in plot G += plot.points([P[0:2] for P in self.points() if not P.is_zero()], args, *kwds) *args, **kwds) File "/opt/SageMath/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_finite_field.py", line 214, in points v = self._points_via_group_structure() File "/opt/SageMath/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_finite_field.py", line 156, in _points_via_group_structure for m in range(1,ni[0]): OverflowError: Python int too large to convert to C long ```