-
-
Notifications
You must be signed in to change notification settings - Fork 554
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
Stability for gcd(x,x) #23171
Comments
Changed keywords from sd86.5 to sd86.5, sd87 |
Changed keywords from sd86.5, sd87 to sd86.5, sd87, padicIMA |
comment:3
Should we change all implementations of gcd (to make a special exception for the trivial gcd), or are there specific ones in mind? |
comment:5
varul: I personally only care about (univariate) polynomial rings. At least in exact rings, I can imagine that if the current implementation has |
comment:6
For the inexact ones, we could say that |
comment:7
How far do you want to take this?
It looks to me like GCD(f,f) should normally NOT be identical to f. If you want to put an optimization into sage for code that calls GCD(x,x) very frequently then you can do that (provided you can do that at essentially zero penalty for the general case), but this should not be part of the API. In practice, it means your code should probably not depend on the optimization being present, because I'd expect that a rewrite down the road would make it disappear again. If you are finding you need this optimization, you're probably better off writing
in the relevant places. |
comment:8
My code does not call the gcd. It's called indirectly in a couple of places. I forget the details but I could create some stack traces to find how this goes exactly. My code won't depend on the optimization being present but it's performance is going to be better if the optimization is present. I don't want to add this requirement to the API of |
Currently, trivial gcds do not return the exact element from the input:
This is unfortunate because such trivial gcds get computed frequently, and any cached properties on the returned gcd are lost.
CC: @tscrim
Component: commutative algebra
Keywords: sd86.5, sd87, padicIMA
Issue created by migration from https://trac.sagemath.org/ticket/23171
The text was updated successfully, but these errors were encountered: