bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Operator Idiosyncrasies


From: Juergen Sauermann
Subject: Re: [Bug-apl] Operator Idiosyncrasies
Date: Sun, 13 Sep 2015 15:15:30 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi,

thanks, fixed in SVN 677.

Interestingly, my APL2 reports DOMAIN ERROR on

      0 +/ 99

/// Jürgen


On 09/11/2015 09:25 PM, Mike Duvos wrote:
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.




reply via email to

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