I wrote this in as typed, if I use a binary string input I get rubbish.
What am I mis-understanding? There is, for example, n and n-1. Doesn't this
imply some integer to binary conversion (and back again)?
Ralph
On Tue, 28 Aug 2007, Roger Hui wrote:
and =: 17 b.
xor =: 22 b.
or =: 23 b.
shift=: 33 b.
nc=: 3 : 0
n=. y
t=. n xor n and n-1
b=. t+n
b or _2 shift (b xor n) <[EMAIL PROTECTED] t
)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm