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

omega() method does not respect precision of object #73

Closed
pjbruin opened this issue Oct 29, 2018 · 3 comments
Closed

omega() method does not respect precision of object #73

pjbruin opened this issue Oct 29, 2018 · 3 comments

Comments

@pjbruin
Copy link

pjbruin commented Oct 29, 2018

In the following example, the precision of E.omega() is too low:

>>> from cypari2 import Pari
>>> P = Pari()
>>> P.set_real_precision_bits(128)
>>> E = P('ellinit([0, 0, 0, 1.0, 0])')
>>> E.omega()
[3.708149354602743838, 1.8540746773013719187 - 1.8540746773013719187*I]

Also, elliptic curves over number fields are not supported:

>>> E = P('ellinit([0, 0, 0, 1, 0], nfinit(y^2 - 2))')
>>> E.omega()
Traceback (most recent call last):
...
cypari2.handle_error.PariError: the PARI stack overflows (current size: 8000000; maximum size: 8003584)
You can use pari.allocatemem() to change the stack size and try again

Both problems can be fixed by using the PARI function member_omega instead of ellR_omega to define the omega() method.

The only disadvantage of this solution is that the precision parameter will be ignored. This means that one has to set the global precision to compute periods of elliptic curves over number fields (like one has to do in GP) instead of passing the precision parameter to omega().

@jdemeyer
Copy link
Collaborator

The only disadvantage of this solution is that the precision parameter will be ignored.

That's strange. I wonder whether there is a fundamental reason for that.

@jdemeyer
Copy link
Collaborator

More generally, we don't have a good solution for dealing for member functions so far, see #51

@jdemeyer
Copy link
Collaborator

jdemeyer commented Mar 4, 2019

The only disadvantage of this solution is that the precision parameter will be ignored.

Not quite ignored. It will use the precision set by ellinit(), which is reasonable.

@jdemeyer jdemeyer closed this as completed Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants