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: Juergen Sauermann
Subject: Re: [Bug-apl] Outer product with replicate error
Date: Tue, 17 May 2016 16:49:43 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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





reply via email to

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