-
Notifications
You must be signed in to change notification settings - Fork 59
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
Finite field sqrt #860
Finite field sqrt #860
Conversation
@thofma @tthsqe12 What do you want me to do here? Are you happy for it to raise an exception (which can be caught) if the Flint function fq_sqrt returns 0? As it is, the Nemo function returns the square root if it is a square, so we can't return a boolean unless you want me to return a tuple. Of course, changing the (proposed exception) behaviour here would imply changing it throughout Nemo. |
I am happy with Regarding is |
That sounds a bit inconvenient. Instead of:
it becomes:
Are you sure you want that? Moreover, an extra object is created to store the sqrt, even if you don't need it! |
I don't mind the We have to do this unfortunately(?) quite often in Hecke. There are lots of function pairs like |
Well, if everyone agrees I guess we can do it. I don't like the [1] very much, but I imagine I could live with it. What is the current mechanism for figuring out what everyone agrees? It seems meetings are only for status reporting. Should I just tag a bunch of people here? |
If you want it, I suppose you could open a ticket first and see if there are any vocal complaints. |
I dont like the issquare()[1]. Nor is catching an exception particularly attractive. If both the property and the object that proves the property true are desired in one function call, how about a third function, issquare_and_sqrt? :) |
I will open an issue somewhere and we can discuss it there. |
Note that this requires Flint-2.7 which will be released later this year, hence the breaking label. Tests will fail until then.
It also changes the actual finite field structs in line with Flint-2.7.
It adds sqrt and is_square.