|Subject:||Re: [Bug-apl] Inconsistent behaviour or operator /|
|Date:||Sun, 12 Jun 2016 14:26:37 +0200|
|User-agent:||Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0|
yes, I believe so.
The ISO standard, chapter 9.2.1 Reduction, allows 2 different variants for reduction called the
Enclose-Reduction-Style (aka. APL2 style) and the Insert-Reduction-Style (aka. Sharp/J style).
GNU APL uses the APL2 style for compatibility with IBM APL2. The APL2 style requires that
the rank of the reduction result is, if possible, one less than the rank of the argument.
In your example, the argument has rank 1 and therefore the result must have rank 0:
⍴⍴ (1 2) (2 3) (3 4)
⍴⍴ ,/ (1 2) (2 3) (3 4)
For that reason the result is enclosed to make it a scalar. The Insert-Reduction-Style
would have produced the result that you had expected.
On 06/12/2016 12:20 AM, Elias Mårtenson wrote:
|[Prev in Thread]||Current Thread||[Next in Thread]|