-
-
Notifications
You must be signed in to change notification settings - Fork 565
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
square root with all=True should not return ValueError but empty list #9466
Comments
This comment has been minimized.
This comment has been minimized.
Fixes the code: sage: 2.sqrt(extend = False, all = True) |
Attachment: my1.patch.gz Attachment: my2.patch.gz Fixes the code: sage: FiniteField(next_prime(2^100))(2).sqrt(extend = False, all = True) |
comment:3
I was not able to fix this code. sage: _.=FiniteField(9) sage: a.sqrt(extend = False, all = True) ValueError: must be a perfect square. |
comment:4
Thanks! That bug has been around for too long :) Why were you not able to fix the Unfortunately, the patches need some more work, for the following three reasons.
If you have any questions, let me know! |
Attachment: 9466.2.patch.gz |
Attachment: 9466.3.patch.gz |
Changed keywords from none to sd23 sd51 sqrt all |
comment:5
Attachment: 9466.patch.gz Does anyone know who user "ruckers" is? (s)he should be added to the list of authors apply 9466.patch |
This comment has been minimized.
This comment has been minimized.
Author: Marco Streng |
comment:6
please review! |
Changed author from Marco Streng to Marco Streng and the person with trac account ruckers |
Reviewer: Alejandro Argaez, Angelos Koutsianas |
comment:7
The patch passed all the tests for sage 5.11 version. |
Merged: sage-5.12.beta3 |
Changed author from Marco Streng and the person with trac account ruckers to Marco Streng, Sonseeahray Rucker |
With Sage 4.4.4 and no relevant patches, I got the following:
At sage days 23 we agreed that square root with all=True should not raise an error. If no square roots exist, then it should return an empty list.
Right now, it returns an empty list for elements of small prime finite fields, but raises an error for integers, elements of large prime finite fields, and elements of non-prime finite fields.
apply
CC: @koffie @sagetrac-ruckers
Component: algebra
Keywords: sd23 sd51 sqrt all
Author: Marco Streng, Sonseeahray Rucker
Reviewer: Alejandro Argaez, Angelos Koutsianas
Merged: sage-5.12.beta3
Issue created by migration from https://trac.sagemath.org/ticket/9466
The text was updated successfully, but these errors were encountered: