Nikodemus Siivola <nikodemus@...> writes:
> 2009/6/2 Stas Boukarev <stassats@...>:
>> Christophe Rhodes <csr21@...> writes:
>>> Stas Boukarev <stassats@...> writes:
>>>> +(deftransform expt ((x y) ((integer -1) integer) *)
>>>> + `(if (evenp y) 1 -1))
>>> Without trying to run it, doesn't this trigger for all integers
>>> greater than or equal to -1?
> Merged as 18.104.22.168, thank you!
As pointed out by Paul Khuong, (- 1 (* 2 (logand 1 y))) would be better
since it doesn't have branching.
With best regards, Stas.