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
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
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
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
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
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 ⎕
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