These are chat archives for symengine/symengine
gcd(x, 4)is supposed to do. If
xis treated as a polynomial it is
gcd(x,4)is 1. If we consider it as a symbol that can take on any value, we have to keep it as it is.
gcd(2, 4) == 2,
gcd(8, 4) == 4etc.
gcd, and just have
integer_gcd, which are two different things.
(x+4)*(x+1)can be a polynomial or a symbolic expression
Mul, or as
Polynomial(not yet in CSymPy)
Polynomialover a ring. So, for comparing with a
Polynomial x, the value,
4, in this case, should also belong to a ring, i.e, both should be polynomials. Which means,
(x+4)*(x+1)should be a polynomial only if every variable is a ring element (
Basicarguments and do the checks internally?
rationalgcd. But the above will fail if user wants polynomial gcd of x and 4 or integer gcd of x and 4 and hence two different function may be needed.