I started with an expression 13 : that did not work as it should And just replaced the 13 with a 3 which worked. I used the 13 to see what the tacit equivalent would look like. Does the 13 have a different effect to what I thought it did?
cheers Roelof Dr. Roelof K. Brouwer PEng PhD http://www.tru.ca/faculty/rbrouwer Professor Emeritus School of Advanced Technologies and Mathematics Thompson Rivers University 900 McGill Road, PO Box 3010 Kamloops, BC, Canada,V2C 5N3 1 250 374 5874 home 1 250 828 5219 work 1 250 377 6133 fax email [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Raul Miller Sent: February 27, 2008 12:54 PM To: General forum Subject: Re: [Jgeneral] FW: surprised On 2/27/08, Roelof K Brouwer <[EMAIL PROTECTED]> wrote: > repl_diag_by_minus_sum_of_row=: 3 : 't-I*+/"1 t=.(-.I=.=/~i.#y)*y' > repl_diag_by_minus_sum_of_row=: 13 : 't-I*+/"1 t=.(-.I=.=/~i.#y)*y' > > applying them to i.5 5 gives two different results with the 2nd giving an > unintended result First off, I prefer to avoid names unless I can come up with good names which are shorter than their expressions. Second, I examined the expressions 3 : 't-I*+/"1 t=.(-.I=.=/~i.#y)*y' i. 5 5 13 : 't-I*+/"1 t=.(-.I=.=/~i.#y)*y' i. 5 5 and I think that the 13 : expression evaluator has a bug which can be worked around by changing that second expression to 13 : 't-I*+/"[EMAIL PROTECTED] t=.(-.I=.=/~i.#y)*y' i. 5 5 Here's my thinking. I tried: 3 : 'I*+/"1 t=.(-.I=.=/~i.#y)*y' i. 5 5 13 : 'I*+/"1 t=.(-.I=.=/~i.#y)*y' i. 5 5 these results were different But when I tried 3 : '+/"1 t=.(-.I=.=/~i.#y)*y' i. 5 5 13 : '+/"1 t=.(-.I=.=/~i.#y)*y' i. 5 5 this pair of expressions gave me results that looked the same. So I then looked at 3 : 'I[+/"1 t=.(-.I=.=/~i.#y)*y' i. 5 5 13 : 'I[+/"1 t=.(-.I=.=/~i.#y)*y' i. 5 5 and, again, my results looked similar. So then I looked at 3 : 'I;+/"1 t=.(-.I=.=/~i.#y)*y' i. 5 5 13 : 'I;+/"1 t=.(-.I=.=/~i.#y)*y' i. 5 5 and my results looked different. So then I looked at the linear form for 13 : 'I;+/"1 t=.(-.I=.=/~i.#y)*y' which is ([: =/~ [: i. #) ([ ; +/"1) ([: -. [: =/~ [: i. #) * ] And, here, I can see that the verb ([ ; +/"1) treats +/"1 as a dyad but the original expression used it as a monad. I can force it to be treated as a monad by replacing +/"1 with +/"[EMAIL PROTECTED] FYI, -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
