[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-apl] Operator Idiosyncrasies
From: |
Mike Duvos |
Subject: |
Re: [Bug-apl] Operator Idiosyncrasies |
Date: |
Fri, 11 Sep 2015 12:25:58 -0700 |
Just in case it isn't instantly obvious what's wrong in the prior post, GNU APL is returning the wrong thing for dyadic reduce with a left argument of zero and a scalar right argument.
If f is a scalar function, and X is a non-empty vector, or a scalar which gets treated as a 1-element vector, then the _expression_...
0 f/ X
Should return a vector of length 1+⍴,X filled in with the identity for f.
Some examples...
0 +/ 99
0 0
0 +/ 10 20 30
0 0 0 0
0 ×/ 100 200 300 400
1 1 1 1 1
In GNU APL...
0 +/ 99
99
And that's why the two results in the prior post differ.