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
Currently, over Z/6Z[x], gcd(x, 2) returns 1, while gcd(2x+2, 2x+2) raises exception.
While the documentation states that the result is tried to made monic when possible, I think the former result doesn't exactly make sense, since the ideal (x, 2) in Z/6Z[x] is not equal to the ideal (1).
Besides, the two results are inconsistent with each other.
Example code:
#include<flint/flint.h>#include<flint/nmod_poly.h>intmain()
{
nmod_poly_tA, B, G;
nmod_poly_init(A, 6);
nmod_poly_init(B, 6);
nmod_poly_init(G, 6);
/* nmod_poly_set_coeff_ui(A, 1, 1); // A = x nmod_poly_set_coeff_ui(B, 0, 2); // B = 2 */nmod_poly_set_coeff_ui(A, 1, 2); // A = 2*x+2nmod_poly_set_coeff_ui(A, 0, 2);
nmod_poly_set_coeff_ui(B, 1, 2); // B = 2*x+2nmod_poly_set_coeff_ui(B, 0, 2);
nmod_poly_gcd(G, A, B);
flint_printf("GCD(x, 2) in Z/6Z[x] = ");
nmod_poly_print_pretty(G, "x");
flint_printf("\n");
nmod_poly_clear(A);
nmod_poly_clear(B);
nmod_poly_clear(G);
return0;
}
The text was updated successfully, but these errors were encountered:
Currently, over Z/6Z[x], gcd(x, 2) returns 1, while gcd(2x+2, 2x+2) raises exception.
While the documentation states that the result is tried to made monic when possible, I think the former result doesn't exactly make sense, since the ideal (x, 2) in Z/6Z[x] is not equal to the ideal (1).
Besides, the two results are inconsistent with each other.
Example code:
The text was updated successfully, but these errors were encountered: