I'm not quite sure of your question, but consider that, as you've given,
> 2 +&*:&+: 3
is
> 16+36
> 52
So, reinstating the dots (ie & ➡️ &.), we will _start_ with this result (52),
and then apply various inverse functions to it. The next obvious questions are
"which functions" and "in what order"?
Clearly, the functions to be applied are the inverses of the functions we
applied to get the original 52, so -: (+:^:_1, halve) and %: (*:^:_1, sqrt).
And it may not be as obvious, but it's also not surprising that the order of
application is also inverted (aka LIFO). I won't offer a proof, just Roger's
intuitive example of "operating _under_ anesthesia":
apply anaesthetics
cut open
do procedure
sew up
wake up from anaesthetics
Here, the anesthetics are +: (double), the cutting tool is *: (square), the
procedure is + (sum), and correspondingly the sewing tool is %: (sqrt), and the
smelling salts are -: (halve):
double (4 6 = +: 2 3)
square (16 36 = *: 4 6)
sum (52 = 16 + 36)
sqrt (7.2111 = %: 52)
halve (3.60555 = -: 7.2111)
Does that clear it up? Or maybe were you asking why 3.60555 also happens to be
the sqrt of 13?
-Dan
> On Apr 4, 2014, at 8:35 AM, Pascal Jasmin f <[email protected]> wrote:
>
> the key to understanding &. is to first understand & , which has separate
> monad and dyad understandings.
>
> 2 +&+: 3
> 10
>
> 2 +&.+: 3
> 5
>
> the vi part can be called as v inv
>
> 2 + (2 : (':';'v inv (v x) u v y')) +: 3
> 5
>
>
> it gets more complicated with nested ones, but you don't understand it till
> you understand the complicated one:
>
> 16+36
> 52
>
> 2 +&*:&.+: 3
> 26
>
>
> I need help understanding why this result happens:
>
> 2 +&.*:&.+: 3
> 3.60555
>
>
> *: 2 +&.*:&.+: 3
> 13
>
>
> why it is not %: 26 ....
>
> *: 2 +(&.*:)(&+:) 3 (easier to follow
> 52
>
>
> -: 2 +(&.*:)(&+:) 3 (half of %:52 is %:13)
> 3.60555
>
>
>
> ----- Original Message -----
> From: Linda Alvord <[email protected]>
> To: [email protected]
> Cc:
> Sent: Friday, April 4, 2014 4:31:37 AM
> Subject: Re: [Jprogramming] I want to understand under
>
> The two parts of the definition of Under are equivalent.
>
> X u&.v y ↔ vi (v x) u (v y) Definition of Under
>
>
> I could write a defition of: . x u&.v y
> '
>
> But could not write a similar tacit verb for: vi (v x) u (v y)
>
> So:
>
> g=: 13 :'x(,~&.>)/y'
> B g A
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Raul Miller
> Sent: Friday, April 04, 2014 4:02 AM
> To: Programming forum
> Subject: Re: [Jprogramming] I want to understand under
>
> What is h supposed to be doing?
>
> Thanks,
>
> --
> Raul
>
>
>
> On Fri, Apr 4, 2014 at 2:25 AM, Linda Alvord <[email protected]>wrote:
>
>> Here’s the problem. Hopefully this looks better and fully defines the
>> problem.
>>
>> f=: 13 :' (B=:;:''am pm''),~&.>/A=:<"1 ":":"0>:i.y'
>> f 12
>> ┌────┬────┬────┬────┬────┬────┬────┬──
>> ──┬────┬────┬────┬────┐
>> │1 am│2 am│3 am│4 am│5 am│6 am│7 am│8 am│9 am│10am│11am│12am│
>> ├────┼────┼────┼────┼────┼────┼────┼──
>> ──┼────┼────┼────┼────┤
>> │1 pm│2 pm│3 pm│4 pm│5 pm│6 pm│7 pm│8 pm│9 pm│10pm│11pm│12pm│
>> └────┴────┴────┴────┴
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm