Roger Hui wrote:

> it is easy to do in low level
> languages, to wit, shift right until least significant bit is 1.

You can simulate this in J along the lines

g=:<:@(# - i:&1)@#:

   g 48
4
   g 1024
10
   g 1023
0

Best wishes,

John


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to