Raul Miller wrote:
> On Thu, Oct 23, 2008 at 10:03 AM, John Randall
> <[EMAIL PROTECTED]> wrote:
>> (1) Are there initializations for the Difference Engine that give
>> "unexpected" results?
>
> Would the following be expected, or unexpected?
>
> _10 _10{. /:"1 op^:(i.50) 10x^i.-50
> 1 17 7 11 8 3 10 0 16 6
> 1 4 18 14 17 2 8 19 3 9
> 17 3 15 10 18 2 6 13 8 14
> 17 8 2 20 11 0 14 3 13 5
> 13 19 17 7 20 8 10 14 11 1
> 15 10 5 12 20 14 11 18 0 17
> 15 11 2 5 9 1 4 17 20 16
> 16 19 14 20 10 0 2 5 9 17
> 3 10 5 19 8 16 12 11 9 20
> 11 3 19 13 18 5 4 16 7 15
>
It's unexpected in that I get something different.
_10 _10{. /:"1 op^:(i.50) 10x^i.-50
9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
You can get the Pascal's triangle effect with
op^:(i.10) (9#0),1
0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 0 0 0 1 1
0 0 0 0 0 0 0 1 2 1
0 0 0 0 0 0 1 3 3 1
0 0 0 0 0 1 4 6 4 1
0 0 0 0 1 5 10 10 5 1
0 0 0 1 6 15 20 15 6 1
0 0 1 7 21 35 35 21 7 1
0 1 8 28 56 70 56 28 8 1
1 9 36 84 126 126 84 36 9 1
Best wishes,
John
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm