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
Change MolienSeries to not hang on certain invalid inputs (#5919)
When a virtual character that is not an actual character was fed
to MolienSeries, that could lead to an infinite loop. The reason
in that case was that a quotient of two polynomials was computed
that did not produce a polynomial, but rather a rational function.
Calling `GcdRepresentation(F, f)` on that as a first step then
tried to compute a ring containing both arguments, which
ultimately caused the infinite loop.
We fix this by passing a parent ring to `GcdRepresentation` which
then raises an error in the above situation. The error message
of course is not perfect, but note that other invalid inputs
already can lead to different errors in other places in the
code. Essentially the user is at fault here for passing in garbage.
But we make this patch anyway because getting any error is certainly
more helpful than an infinite loop.
0 commit comments