Martin, In my example, using + instead of -, u was the double of a single roll and v was the sum of two "independent" rolls.
Yours is a far better example for illustrating the issue, ( u=. 3 : ' T - (T=. ? y)' ) 3 : ' T - (T=. ? y)' u is one roll minus itself which produces zeroes; whereas ( v=. 13 : ' T - (T=. ? y)' ) ? - ? is the difference of two "independent" rolls. Thus, for example, u 0 0 0 0 0 0 0 0 0 0 whereas, v 0 0 0 0 0 _0.0389238 0.321837 0.0862073 0.552116 _0.134629 Thanks! I had one of those moments after I read your posts... Why did I not think of that? :) On Wed, Oct 17, 2018 at 8:08 AM Martin Kreuzer <i...@airkreuzer.com> wrote: > Addendum: > > Consider, in contrast, the behaviour of this *explicit* definition: > > ee=. 3 : 'T - T=. ?y' > ee 10+i.7 > 0 0 0 0 0 0 0 > > Same result as working *outside* a verb definition: > > ] T=. ? 10+i.7 > 6 6 0 9 12 1 5 > T - T > 0 0 0 0 0 0 0 > > -M > > At 2018-10-17 11:40, you wrote: > > >Let's modify Jose's example (by taking the *difference* of two > >identocal terms): > > > >NB. this works as expected: > > > > d=. 13 : 'T - T=. +:y' > > d 10+i.7 > >0 0 0 0 0 0 0 > > > >NB. this doesn't: > > > > e=. 13 : 'T - T=. ?y' > > e 10+i.7 > >_1 1 5 _5 8 _2 _4 > > > >NB. this yields the same result (zero) for every argument: > > > > d > >+--+-+--+ > >|+:|-|+:| > >+--+-+--+ > >+: - +: > > > >NB. this yields arbitrary results (because minuend and subtrahend do > >not necessaryly have the same value): > > e > >+-+-+-+ > >|?|-|?| > >+-+-+-+ > >? - ? > > > >But ... from the underlying structure they should have. > > > >NB. in comparison this works as intended: > > > > f=. 13 : 'T - T=. ?.y' > > f 10+i.7 > >0 0 0 0 0 0 0 > > f > >+--+-+--+ > >|?.|-|?.| > >+--+-+--+ > >?. - ?. > > > >-M > > > > > >At 2018-10-17 10:22, you wrote: > > > >>Jose, > > > >>You said: You might be interested to know that 13 : '...' > >>occasionally is too smart; some verbs, such as ?, which do not > >>always produce the same result given the same argument, sometimes > >>do not mix well with 13 : '...'; for example, > > > >>Something is not wrong when verbs with ? don't agree. I would > >>worry is they did agree. They areproducing different results each > >>time they are used. > > > >>Linda > > > > > >>-----Original Message----- > >>From: Programming <programming-boun...@forums.jsoftware.com> On > >>Behalf Of Jose Mario Quintana > >>Sent: Tuesday, October 16, 2018 7:37 PM > >>To: Programming forum <programm...@jsoftware.com> > >>Subject: Re: [Jprogramming] Using rank to avoid looping - reference? > > > >>Linda, > > > >>You might be interested to know that 13 : '...' occasionally is too > >>smart; some verbs, such as ?, which do not always produce the same > >>result given the same argument, sometimes do not mix well with 13 : > >>'...'; for example, > > > >> ( u=. 3 : ' T + (T=. ? y)' ) > >>3 : ' T + (T=. ? y)' > > > >>and > >> ( v=. 13 : ' T + (T=. ? y)' ) > >>? + ? > > > >>do not mean the same process. > > > >>I hope it helps > > > >---------------------------------------------------------------------- > >For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm