-
Notifications
You must be signed in to change notification settings - Fork 63
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
Remove generic is_power and root methods #1479
base: master
Are you sure you want to change the base?
Conversation
These method are not useful in practice.
Codecov Report
@@ Coverage Diff @@
## master #1479 +/- ##
==========================================
+ Coverage 84.76% 84.81% +0.04%
==========================================
Files 110 110
Lines 29370 29354 -16
==========================================
+ Hits 24895 24896 +1
+ Misses 4475 4458 -17
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I disagree. What is the downside of having the |
This code currently tries to implement For this to be useful, someone (probably whoever implemented The code is also never tested right now, and as result does not even work:
or when trying to use it in Nemo:
But if you think it might some day be useful for someone, we can keep it, but perhaps then at least diff --git a/src/generic/Misc/Rings.jl b/src/generic/Misc/Rings.jl
index 35a79fdd6..21d612a68 100644
--- a/src/generic/Misc/Rings.jl
+++ b/src/generic/Misc/Rings.jl
@@ -12,8 +12,7 @@ function is_power(a::RingElem, n::Int)
return true, a
end
R = parent(a)
- Rt = PolyRing(R)
- x = gen(Rt)
+ Rt, x = polynomial_ring(R)
r = roots(x^n - a)
if length(r) == 0
return false, a I get this in AA:
|
I will fix it |
These method are not useful in practice.