-
Notifications
You must be signed in to change notification settings - Fork 58
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
Method error when multiplying an AcbPolyRingElem
by some small rational
#1652
Comments
acb_poly
by some small rationalAcbPolyRingElem
by some small rational
Thank you for reporting this issue! As a quick workaround in case you need it: this works when using "our" rational numbers:
Apparently the polynomial ring interface has a required Also we should add a "polynomial ring interface conformance test suite". Then the "ring interface conformance test suite" should automatically run that for any Finally, we can of course also define specialized ad-hoc multiplication methods for e.g. |
Looking into this reveals so many bads thing 😭 OK first of, I think we should add this generic method to AbstractAlgebra (and similar ones for NC polynomials, series, etc.?) function Nemo.normalise(a::PolyRingElem, n::Int)
while n > 0 && iszero(coeff(a,n))
n -= 1
end
return n + 1
end Perhaps also add an Anyway, the Julia code above is a modified version of this method from AA which only applies to the "generic polynomial" implementation -- note that differing return value there which is wrong: function normalise(a::Poly, n::Int)
while n > 0 && iszero(a.coeffs[n])
n -= 1
end
return n # <- this is WRONG
end The documentation says So: any code that has been using There are almost identical methods in AA for So the next thing to do is to audit all (?) code calling |
It is not clear what the semantics for polynomials with inexact coefficients is and if your generic |
OK fine then the generic And the generic code calling We still should fix it so that documentation and code match. For the issue here, we can also solve it by modifying this code:
... to also include |
Setup:
Problem:
The text was updated successfully, but these errors were encountered: