It has to do with that x and y occupy the same memory locations. As I said, the bug is previously fixed in J601.
You can discover through benchmarks that special code is used: ts=: 6!:2 , 7!:[EMAIL PROTECTED] x=: 1e6 [EMAIL PROTECTED] 1e5 y=: 0+x ts 'x i. x' 0.114625 4.71917e6 ts 'x i. y' 0.185352 4.71917e6 x of course has the same memory locations as x . x does not have the same memory locations as y even though x and y are identical to the last bit. For other kinds of data the special code makes a bigger difference: x=: 1e4 100 [EMAIL PROTECTED] 1e6 y=: 0+x ts 'x i. x' 0.112901 199744 ts 'x i. y' 0.207477 199744 (i. i: e. -. ~. etc. belong to the family and have the same underlying code.) ----- Original Message ----- From: "Joey K Tuttle" <[EMAIL PROTECTED]> To: "Programming forum" <[email protected]> Sent: Thursday, May 18, 2006 1:36 PM Subject: [Jprogramming] Re: simple qn. on e. At 12:57 -0700 2006/05/18, Sashikanth Chandrasekaran wrote: >Providing the output for the sentences, as per Dan >Bron's suggestion: > >(BTW, I am getting the same unexpected results with >J504 on Windows also). > The problem really isn't complicated, complex, or even "special" data ... consider - version '' j504/2005-03-30/13:35 Running in: Darwin (i. 2 2) e. i. 2 2 1 1 e. ~ i. 2 2 0 0 e."1 ~ i. 2 2 1 1 1 1 e."1 ~ i. 3 2 0 0 0 0 0 0 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
