bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] dfn-reduction bug


From: Jay Foad
Subject: [Bug-apl] dfn-reduction bug
Date: Fri, 8 Jul 2016 08:42:21 +0100

Juergen,

Just in case you missed this, buried in another thread:

      X←⊂¨,¨⍳2 ⋄ (+/X) ≡ ({⍺+⍵}/X)
0

FYI I get the following results on various APLs:

      X←⊂¨,¨⍳2 ⋄ (≡+/X)(≡{⍺+⍵}/X) ⍝ GNU APL
2 3
      X←⊂¨,¨⍳2 ⋄ (≡+/X)(≡{⍺+⍵}/X) ⍝ Dyalog APL
3 3
      X←⊂¨,¨⍳2 ⋄ (≡+/X)(≡{⍺+⍵}/X) ⍝ NARS 2000
3 3
      X←⊂¨,¨⍳2 ⋄ (≡+/X) ⍝ IBM APL2
3

Jay.

On 7 July 2016 at 11:39, Kacper Gutowski <address@hidden> wrote:
In any case, the problem seems not to be related to inner product or to
parsing of multiple operators at all.  It manifests in any reduction of
a deeply nested array with a primitive function.  Lambdas work fine.

Even when using single-element arrays, the result still has a wrong shape:

      X←⊂¨,¨⍳2 ⋄ (≡+/X) ≡ (≡{⍺+⍵}/X)
0
      X←⊂¨,¨⍳3 ⋄ (⍴⊃+/X) ≡ (⍴⊃{⍺+⍵}/X)
0

-k


reply via email to

[Prev in Thread] Current Thread [Next in Thread]