_1 |.!.0 k 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 (-1) |.!.0 k 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Right to left evaluation. Need to use _ to indicate a negative number On May 25, 2017 10:41 PM, "Michael Rice" <[email protected]> wrote: > From the documentation: > > |.!._ i.6 NB. Monad: |.!._ y (shift right 1) is same as Dyad: x > |.!._ y with x=_1 > _ 0 1 2 3 4 > > ====When I try it=== > > |.!._ i.6 > _ 0 1 2 3 4 > |.!.0 i.6 > 0 0 1 2 3 4 > _1 |.!._ i.6 > _ 0 1 2 3 4 > _1 |.!.0 i.6 > 0 0 1 2 3 4 > _2 |.!.0 i.6 > 0 0 0 1 2 3 > > So far, so good. > > But... > > k =: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > k > 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > -1 |.!.0 k > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > -2 |.!.0 k > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > > Why isn't k getting rotated right as i.6 was rotated? > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
