You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionnormalise(a::Poly, n::Int)
while n >0&&iszero(a.coeffs[n])
n -=1endreturn n # <- this is WRONG?!end
However the documentation says normalise returns the length of the polynomial after normalisation, which is the degree PLUS ONE, which disagrees with what that code does.
In contrast, the normalise methods in Nemo seem to follow what the documentation does.
So: any code that has been using normalise probably is subtly broken: either it gives wrong results, or it is adapted to the wrong implementations of normalise. We need to figure out which it is and either adapt the documentation, or the implementations (probably both to some degree).
The text was updated successfully, but these errors were encountered:
This comes from a discussion on Nemocas/Nemo.jl#1652.
Most
normalise
methods in AA look like thisHowever the documentation says
normalise
returns the length of the polynomial after normalisation, which is the degree PLUS ONE, which disagrees with what that code does.In contrast, the
normalise
methods in Nemo seem to follow what the documentation does.So: any code that has been using
normalise
probably is subtly broken: either it gives wrong results, or it is adapted to the wrong implementations ofnormalise
. We need to figure out which it is and either adapt the documentation, or the implementations (probably both to some degree).The text was updated successfully, but these errors were encountered: