|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] an other inner product ,., bug |
Date: | Fri, 18 May 2018 17:03:24 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
Hi Jay, yes. Even worse: there is another subtle difference in the inner products of IBM APL2 and the ISO standard. IBM APL2 states (language reference, page 165) and also does this: A f.g B ←→ f/¨ (⊂[⍴⍴A]A) ∘.g ⊂[1]B The ISO standard follows suit, except that it has a special case for A and B being vectors: "If A and B are both vectors, return f/A g B." (ISO standard, page 121 with A=A1 and B=B1). GNU APL follows the ISO standard, so in David's example A g B is 1 2 3 , 4 5 6 (or: 1 2 3 4 5 6) and ,/1 2 3 4 5 6 is ⊂(1 2 3 4 5 6). The enclose is needed because the reduction of a vector has to be a scalar (according to the Implementation parameter "Enclose-Reduction-Style" which GNU APL and IBM APL2 have chosen). Best Regards, /// Jürgen On 05/18/2018 03:31 PM, Jay Foad wrote:
|
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] | Current Thread | [Next in Thread] |