Re: [Bug-apl] an other inner product ,., bug

2018-05-21 Thread Juergen Sauermann
Hi Jay, I believe that when they wrote the ISO standard they were still used to the old APL, where f and g had to be scalar functions and then f/A g B of two vectors would anyhow be a scalar, and therefore they simply forgot to enclose the result of f

Re: [Bug-apl] an other inner product ,., bug

2018-05-21 Thread Jay Foad
If you followed this part of the ISO standard verbatim then: 2 3 +.⍴ 4 5 ←→ +/2 3 ⍴ 4 5 ←→ 13 14 GNU APL and APL2 actually return ⊂13 14 which seems more sensible. I am not sure why ISO has (or needs) that special case. It seems wrong to me. Jay. On 18 May 2018 at 16:03, Juergen Sauermann

Re: [Bug-apl] an other inner product ,., bug

2018-05-18 Thread Juergen Sauermann
Hi Jay, yes. Even worse: there is another subtle difference in the inner products of IBM APL2 and the ISO standard. IBM APL2 states (language reference, page 165) and also does this: A f.g B  ←→  f/¨ (⊂[⍴⍴A]A) ∘.g ⊂[1]B The

Re: [Bug-apl] an other inner product ,., bug

2018-05-18 Thread Jay Foad
This is a subtle difference in the definition of inner product. On vectors: A f.g B ←→ ⊂f/A g B ⍝ APL2 A f.g B ←→ f/A g¨ B ⍝ NARS2000, Dyalog Jay. On 17 May 2018 at 17:52, David Tran wrote: > Hi, > > Below shows the bug: > > 1 2 3 ,., 4 5 6 > > result: 1 2 3 4 5 6 > expected: 1 4 2 5 3 6

Re: [Bug-apl] an other inner product ,., bug

2018-05-17 Thread David Tran
Hi Jürgen, Thank you for verification. My bad, I did not check with IBM APL2. Best Regards, David On Thu, May 17, 2018 at 2:39 PM, Juergen Sauermann < juergen.sauerm...@t-online.de> wrote: > Hi David, > > GNU APL shows the same behavior as IBM APL2 (except that the IBM result is > nested one m

Re: [Bug-apl] an other inner product ,., bug

2018-05-17 Thread Juergen Sauermann
Hi David, GNU APL shows the same behavior as IBM APL2 (except that the IBM result is nested one more level)):   1 2 3,.,4 5 6  1 2 3 4 5 6   ⍴1 2 3,.,4 5 6   ≡1 2 3,.,4 5 6 2   4 ⎕

[Bug-apl] an other inner product ,., bug

2018-05-17 Thread David Tran
Hi, Below shows the bug: 1 2 3 ,., 4 5 6 result: 1 2 3 4 5 6 expected: 1 4 2 5 3 6 Thanks, David