Before, 'refine_Pow' would simplify (-1)**exp only if 'exp' as a whole couold
be determined as even or odd. A doctest like,
>>> refine_Pow((-1)**(x+y), Assume(x, Q.even))
(-1)**y
would fail. This patch fixes that by treating powers of S.NegativeOne as
a special case. Every term
On Feb 22, 2010, at 12:43 PM, Øyvind Jensen wrote:
> Before, 'refine_Pow' would simplify (-1)**exp only if 'exp' as a whole couold
> be determined as even or odd. A doctest like,
>
> >>> refine_Pow((-1)**(x+y), Assume(x, Q.even))
> (-1)**y
>
> would fail. This patch fixes that by