Henry Rich <[email protected]> wrote:
> Offset binary.
> 
> /:~&.(22 b.&16b8000000000000000)
> 

Cute! But I think the mask needs to be negative. INT_MAX is all f's.

       /:~&.(22 b.&16b8000000000000000) i:10
    _1 _2 _3 _4 _5 _6 _7 _8 _9 _10 10 9 8 7 6 5 4 3 2 1 0

       /:~&.(22 b.&_16b8000000000000000) i:10
    0 1 2 3 4 5 6 7 8 9 10 _10 _9 _8 _7 _6 _5 _4 _3 _2 _1

Actually, do we have an off-by-one error in the number parser?

       (= 63 #.@$ 1:) 16b8000000000000000
    1
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to