From: "Eldon Eller" <[EMAIL PROTECTED]>
> The arc tangent of _1r1 is different from the arc tangent of 1r_1.

From: "Randy MacDonald" <[EMAIL PROTECTED]>
>   (_3 o. 1r_1) = _3 o. _1r1
>1

I believe Eldon means it in a mathematical sense.  Probably in the same way  
111r333  can differ from  1r3  (which neither J nor I can fathom).  To J,  1r_1 
 and  _1r1  are the same quantity:

           _1r1
        _1
           1r_1
        _1
           _1r1 -: 1r_1
        1
           _1r1 -:&:(3!:3) 1r_1  NB.  Identical to the last bit, even in 
internal rep
        1

So of course any operation on these quantities is going to produce the same 
output: they're the same input.  In fact, I shouldn't say "these quantities", I 
should say "this quantity".

None the less, there are ways of looking at the two quantities where they'll 
differ.  For example, when I was in college, I always saw  ^._1  defined to be  
0 j. 1p1  .  But that bugged me, because:

           _1 -: % _1               NB.  (A) The important part.
           _1 -:   ^ 0 j.   1p1     NB.  (B) Euler
           _1 -: % ^ 0 j.   1p1     NB.  (C) Substitute (B) into (A)
           _1 -: ^   0 j. - 1p1     NB.  (D) (%x^y) <==> (x^-y)

With (D), it becomes clear that  ^._1  is also equivalent to  ^.(^ 0 j.-1p1) .  
And  ^.  and  ^  are an inverse pair -- they cancel out.  So that leaves us 
with  (^._1)  -: 0 j.-1p1  .  So it matters whether you think of  _1  as  _1r1  
or as  1r_1  (i.e.  %_1 ). See postscript.   

Again, keep in mind,  J  cannot see the "differences" in these quantities.  In 
J's internals, they're represented identically.  It is impossible for an 
operation to reveal the difference, because no difference exists.  So, despite 
my little "proof":

           (^._1)  -: 0 j.-1p1
        0

-Dan

PS:

I'm not a mathematician, but it seems to me that the right solution is to 
express  ^._1  as  0 j. (+,-) 1p1  .  But no one does.  At least not in front 
of me.

Not that such would present a solution for J.  If there are multiple solutions 
to a mathematical operation, J picks one.  Think of  0%0  or  %:y  :

            4 -: *: _2  NB.  Yep
        1
           _2 -: %:  4  NB.  Nope
        0


I wonder if Perl6 will leverage its fancy new junctions to produce answers like 
 (+,-)2 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to