-
Notifications
You must be signed in to change notification settings - Fork 244
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
Input and output not allowed to be same instance in composing? #2067
Comments
Could you provide a minimal working example written in C? |
Here's the simplest C example where this happened to me:
which outputs
If this is indeed not the intended behavior I'd also be happy to track down the issue. |
Yeah, it looks like there should be an aliasing check here. |
Alright, the problem is that the function _fmpz_mpoly_compose_mat(A,B,...) requires A!=B. There's an assert which would have caught the above problem, had I turned on asserts. |
Are the first two polynomials in the function fmpz_mpoly_compose_fmpz_mpoly allowed to be the same? I haven't found anything in the documentation that would tell me otherwise.
If so, the following (C++) code leads to random (incorrect) output:
Leads for example to an output of the form:
Also note that uncommenting the line in the for loop will produce a correct output.
If one is not intended to have input=output it would be useful to know, for which functions this is forbidden.
The text was updated successfully, but these errors were encountered: