On Tue, Dec 8, 2009 at 1:58 PM, Phil Deets <[email protected]> wrote: > On Tue, 08 Dec 2009 16:44:46 -0500, Phil Deets <[email protected]> wrote: > >> I think n is always non-negative in the trig series, but some Laurent >> series use negative n values. So (-1)^^n might be useful for negative n, but >> you could always rewrite it as (n%2 ? -1 : 1) or ~(n&1)+1. > > Oops, ~(n&1)+1 doesn't work, but ~((n&1)<<1)+2 does.
Right, and you can always write x^^y as pow(x,y). A major point of opPow is to avoid unnatural wonky-isms like you what you wrote there. --bb
