bug-apl
[Top][All Lists]
Advanced

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

Re: Wrong result from dyadic ¨ with empty argument


From: Dr . Jürgen Sauermann
Subject: Re: Wrong result from dyadic ¨ with empty argument
Date: Thu, 28 May 2020 20:34:12 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hi Ben,

thanks, fixed in SVN 1287.

Best regards,
Jürgen


On 5/28/20 6:07 PM, Ben Harris wrote:
Thank you for GNU APL!  I think I've found a bug in SVN revision 1286.

Applying the dyadic ¨ ('each') operator where one or both arguments is an empty array results in a scalar rather than an empty array as the result:

      (0⍴0)+¨1
0
      (0⍴0)+¨(0⍴0)
0
      1+¨(0⍴0)
0
      ⍴((0⍴0)+¨(0⍴0))

      ⍴⍴((0⍴0)+¨(0⍴0))
0

Both ISO/IEC 13751 and the IBM APL2 Reference seem to me to say that the shape of the result should be the shape of the non-scalar argument, so the first three expressions above should all return 0⍴0 rather than 0.



reply via email to

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