6
$\begingroup$

Rather by accident I've noticed that the following trivial code produces different output in Mathematica 9 and 10:

-((-1)^n)

Mathematica 9:

$-(-1)^n$

Mathematica 10:

$(-1)^{(n+1)}$

Both forms are of course correct, but this a bit annoying if one uses the same set of unit tests to check the code against both versions. Can someone confirm this? Does someone know the reasoning behind this change?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.