Re: [PATCH] refine: Let refine_Pow work harder to simplify powers of (-1)

2010-03-19 Thread Vinzent Steinberg
This is in, thank you! Vinzent 2010/2/23 Øyvind Jensen jensen.oyv...@gmail.com: Before, 'refine_Pow' would simplify (-1)**exp only if 'exp' as a whole could be determined as even or odd.  A doctest like,         refine_Pow((-1)**(x+y), Assume(x, Q.even))        (-1)**y would fail.  This

Re: [PATCH] refine: Let refine_Pow work harder to simplify powers of (-1)

2010-02-23 Thread Øyvind Jensen
Great suggestions! I'll create a new patch. Øyvind ma., 22.02.2010 kl. 14.13 -0700, skrev Aaron S. Meurer: 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,

[PATCH] refine: Let refine_Pow work harder to simplify powers of (-1)

2010-02-23 Thread Øyvind Jensen
Before, 'refine_Pow' would simplify (-1)**exp only if 'exp' as a whole could 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 in

[PATCH] refine: Let refine_Pow work harder to simplify powers of (-1)

2010-02-22 Thread Øyvind Jensen
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

Re: [PATCH] refine: Let refine_Pow work harder to simplify powers of (-1)

2010-02-22 Thread Aaron S. Meurer
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 treating