|
From: | Dr . Jürgen Sauermann |
Subject: | Re: Unexpected result with inner product |
Date: | Wed, 26 Jan 2022 21:47:33 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
Consider the following code:
A←3 4⍴1 3 2 0 2 1 0 1 4 0 0 2
B←4 2⍴4 1 0 3 0 2 2 0
Q←{⍺/⍵}
(A≠0) +.Q B
My reading (and implementation) of the ISO spec suggests the output should be the following:
┏━━━┓
┃4 6┃
┃6 4┃
┃6 1┃
┗━━━┛
However, in GNU APL I get this:
┏→━━━━━━┓
↓┏⊖┓ ┏⊖┓┃
┃┃0┃ ┃0┃┃
┃┗━┛ ┗━┛┃
┃┏⊖┓ ┏⊖┓┃
┃┃0┃ ┃0┃┃
┃┗━┛ ┗━┛┃
┃┏⊖┓ ┏⊖┓┃
┃┃0┃ ┃0┃┃
┃┗━┛ ┗━┛┃
┗∊━━━━━━┛
Which one is correct?
Regards,Elias
[Prev in Thread] | Current Thread | [Next in Thread] |