Ask Your Question

Revision history [back]

Sage symbolic math simplification error

In sagemath version 9.1, the code

product(1-q^x, x, 1, N)

returned

-(-1)^N*product(q^x - 1, x, 1, N)

while the correct result ought to be

(-1)^N*product(q^x - 1, x, 1, N)

What went wrong? Where did this sign change come from?

Sage symbolic math simplification error

In sagemath version 9.1, the code

product(1-q^x, x, 1, N)

returned

-(-1)^N*product(q^x - 1, x, 1, N)

while the correct result ought to be

(-1)^N*product(q^x - 1, x, 1, N)

What went wrong? Where did this sign change come from?