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
WIP: ELLIPTIC CURVE #18680
WIP: ELLIPTIC CURVE #18680
Conversation
🟠Hi, I am the SymPy bot (v151). I've noticed that some of your commits add or delete files. Since this is sometimes done unintentionally, I wanted to alert you about it. This is an experimental feature of SymPy Bot. If you have any feedback on it, please comment at sympy/sympy-bot#75. The following commits add new files:
If these files were added/deleted on purpose, you can ignore this message. |
✅ Hi, I am the SymPy bot (v151). I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.6. Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it. Click here to see the pull request description that was parsed.
|
You should preserve the original commits in #2449. After fetching the PR, you should only add new commits to the same branch. |
could you tell me how to fetch that pr. |
from .residue_ntheory import sqrt_mod | ||
|
||
|
||
class EllipticCurve(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, ()
can be removed.
The default domain is ``QQ``. If no coefficient ``a1``, ``a2``, ``a3``, | ||
it create curve as following form. | ||
`y^{2} = x^{3} + a_{4} x + a_{6}` | ||
Examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An empty line is needed here.
`y^{2} = x^{3} + a_{4} x + a_{6}` | ||
Examples | ||
======== | ||
References |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
[3] G. Hardy, E. Wright "An Introduction to the Theory of Numbers" Sixth Edition | ||
""" | ||
|
||
def __init__(self, a4, a6, a1=0, a2=0, a3=0, domain=QQ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, in SymPy, __new__
is used as a constructor.
elif isinstance(self._domain, RationalField): | ||
self._rank = None | ||
|
||
def __call__(self, x, y, z=1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this?
def minimal(self): | ||
""" | ||
Return minimal Weierstrass equation. | ||
Examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An empty line is needed here.
+1
Return minimal Weierstrass equation. | ||
Examples | ||
======== | ||
>>> from sympy.ntheory.ec import EllipticCurve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
I think that |
i += 1 | ||
if p.z == 0: | ||
return i | ||
return oo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new line is needed at the end.
revives #2449