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
Extra doctests for indefinite binary quadratic forms #6106
Comments
Attachment: 6106binaryQuadratic.patch.gz Attachment: 6106binaryQuadraticPT2.patch.gz added missing doctests |
comment:1
Am changing this from "need review" to "needs review" so it shows up in the standard queries |
comment:2
Review The patch applied fine to 4.0.1, and it provides some functions which look useful. I think that not all new new functions have doctests. Why are the new functions not implemented as member functions of the BinaryQF class? That would be much better; as it is anyone using them has to import them explicitly. So I suggest that they are converted to be member functions (which is trivial to do). Secondly, the use of the python math functions sqrt and floor is not a good idea, since the coefficients of the form will be Sage integers. For example:
For example, the line if sqrt(delta) <= abs(a): could be replaced by if delta <= a**2: . The docstring for this function should also say what the definition of "normalised" is. I also slightly amended the ticket's title to give a better description. |
comment:3
Alia and I are going to work on this in the next few days. |
Reviewer: John Cremona, Nick Alexander |
Author: Alia Hamieh |
Attachment: 6106BinaryQF.patch.gz [with patch, needs review] Additional functions for Indefinite Binary Quadratic Forms |
comment:6
This ticket seems to implement the same functionality as (part of) #4120, which has been inactive for a very long time, like this ticket. |
comment:9
Replying to @pjbruin:
Now that #4120 has been merged, it would be good to check if this ticket still adds new functionality. If not, we could also just add the examples from this ticket. |
comment:10
This ticket does not add anything new. |
comment:11
Replying to @simonbrandhorst:
OK. It might still be useful to add the doctests from this ticket; what do you think? |
comment:12
If I recall correctly the reduction of an indefinite form is not unique but instead we get a cycle of forms. So we can add some doctests. But the results may be different. Note that we messed up a little for indefinite forms of square determinant #25861. |
Commit: |
Branch: u/pbruin/6106-BinaryQF_examples |
comment:13
Here are some doctests from the patches. I checked that they are mathematically correct. The docstring for |
Changed reviewer from John Cremona, Nick Alexander to John Cremona, Nick Alexander, Simon Brandhorst, Peter Bruin |
Changed commit from |
comment:14
doc builds. |
Changed branch from u/pbruin/6106-BinaryQF_examples to none |
Changed reviewer from John Cremona, Nick Alexander, Simon Brandhorst, Peter Bruin to John Cremona, Nick Alexander, Simon Brandhorst |
This comment has been minimized.
This comment has been minimized.
Commit: |
comment:16
Replying to @simonbrandhorst:
From your other changes, it doesn't look like you really intended to delete the branch and change the milestone to sage-duplicate/invalid/wontfix... |
Branch: u/pbruin/6106-BinaryQF_examples |
comment:17
Ooops indeed. Thank you. |
Changed branch from u/pbruin/6106-BinaryQF_examples to |
Extra doctests for indefinite binary quadratic forms
CC: @ncalexan
Component: quadratic forms
Keywords: binary quadratic forms
Author: Alia Hamieh
Branch/Commit:
9af692e
Reviewer: John Cremona, Nick Alexander, Simon Brandhorst
Issue created by migration from https://trac.sagemath.org/ticket/6106
The text was updated successfully, but these errors were encountered: