lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> You forgot the other "bunny" (whatever that means ;-):
> 
> >    not A = -A - 1     (Paul Hsieh wrote that)
> 
> So, you have
> 
> function bor (a,b) return -band(-a-1, -b-1)-1 end

Oops. I am being stupid yesterday. In particular, looking at the not 
relationship (and indeed, knowing about it, of course!) I didn't think of 
using it...duh...

-- 
http://www.mupsych.org/~rrt/
Quidquid latine dictum sit, altum viditur (Anon)