bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Outer product with replicate error


From: Alexey Veretennikov
Subject: Re: [Bug-apl] Outer product with replicate error
Date: Tue, 17 May 2016 19:57:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.91 (darwin)

Hi,

Dyalog also produces the same result as GNU APL:

     1 2 3 /¨ 4 5 6
 4  5 5  6 6 6 


Juergen Sauermann <address@hidden> writes:

> Hi Peter,
>
> is seems like IBM APL2 computes 
>       1 2 3 /¨ 4 5 6
> as:
> (1 2 3/4) (1 2 3/5) (1 2 3/6)
>
> However, the ISO standard says 
>
> Z ← A f¨ B
> Informal Description: The operand function f is applied independently to 
> corresponding
> items of the arguments, or (monadic case) independently to the items of the 
> argument.
> The corresponding results are assembled in an array of the same shape as the 
> argument(s).
>
> Evaluation Sequence:
> ...
> For form Af¯B,
> Set X to item I of the ravel-list of A.
> Set Y to item I of the ravel-list of B.
> For each pair X and Y of corresponding items from A and B, Evaluate-Dyadic-
> Function with XfY giving token T.
> ...
>
> I believe this is one of the very few cases where IBM is wrong.
>
> /// Jürgen
>
> On 05/16/2016 04:25 PM, Hans-Peter Sorge wrote:
>
>  
> Hi,
>
> just to mention, there is an other difference in interpretation
> regarding the scan operator GNU-APL vs IBM-APL.
>
> GNU-APL:
>       1 2 3 /¨ 4 5 6
>  4  5 5  6 6 6
>
> IBM-APL:
>
>            1 2 3 /¨ 4 5 6
>  4 4 4 4 4 4  5 5 5 5 5 5  6 6 6 6 6 6
>
>
> Best Regards,
> Hans-Peter
>
>
>
>

-- 
Br,
/Alexey



reply via email to

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