I don't have enough karma on ask.sagemath, so I would like to ask this question
here:
Hi sage-nt, I've tried a couple different methods for trying to limit the
amount of time sage takes to calculate the rank of an elliptic curve. This is
an example that takes a long time to compute for testing:
E = EllipticCurve([ -1/36, -1/36, 0, -1, 1 ])
E.rank()
I've tried suggestions that are based on Python, using decorators, and involve
creating a wrapper function with the time-limit added, but none of my attempts
have been successful.
- [ stackoverflow post 1 ]( http://stackoverflow.com/a/366763/3161979 )
- [ stackoverflow post 2 ]( http://stackoverflow.com/a/601168/3161979 )
- [ filosophy blog post ](
https://www.filosophy.org/post/32/python_function_execution_deadlines__in_simple_examples/
)
Each of these has seemed to work for trivial examples (like with timing out on
a long sleep function), but I haven't been able to get this to work with rank
calculations like the example above.
Does anybody have any suggestions that might work for me?
My goal is to print details about an elliptic curve to a file, and if it can't
compute the rank quickly enough to write something like "difficult to
calculate" and move on to printing the rest of the information.
Thank you,
Christian
--
You received this message because you are subscribed to the Google Groups
"sage-nt" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send an email to [email protected].
Visit this group at https://groups.google.com/group/sage-nt.
For more options, visit https://groups.google.com/d/optout.