Semantics of ^^
Phil Deets
pjdeets2 at gmail.com
Tue Dec 8 13:58:41 PST 2009
On Tue, 08 Dec 2009 16:44:46 -0500, Phil Deets <pjdeets2 at gmail.com> 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.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
More information about the Digitalmars-d
mailing list