Hi, Dyalog APL and GNU APL use different reduction styles and both are allowed in the ISO standard. I had a brief look at the example and my impression is that the differences for f.g in Dyalog APL and in GNU APL are primarily caused by the different reduction styles. I also tested IBM APL2 and they return yet another result which is different from Dyalog APL but also different from GNU APL. The reason for that seems to be that for an f/, IBM APL2 encloses the reduction result one level deeper than GNU APL. If I remember correctly then at the time when I wrote the reduction code I believed that enclosing a scalar would always be a no-op while in fact only enclosing a simple scalar is a no-op. I will look into making GNU APL compatible to IBM APL2, but I am afraid that the difference between IBM APL2 and Dyalog APL will remain. /// Jürgen On 07/07/2016 04:59 AM, Kacper Gutowski
wrote:
On 6 July 2016 at 20:31, Xiao-Yong Jin wrote:I’m not sure which one is at fault here. Any idea?The standard explicitly says A f.g B ←→ f/A g B when A & B vectors.A←⊂[1]⍳2 3 B←⊂[1]10×⍳2 3 GNU APL is at fault here: {⍺+.+⍵}/A+B 165 242 (+.+)/A+B 209 198 But in the +.(+.+) case, it's Dyalog that gives unexpected results: +/A(+.+)B 33 66 66 66 A+.(+.+)B 99 132 -k |
- [Bug-apl] multiple inner product Xiao-Yong Jin
- Re: [Bug-apl] multiple inner product Kacper Gutowski
- Re: [Bug-apl] multiple inner product Jay Foad
- Re: [Bug-apl] multiple inner product Kacper Gutowski
- Re: [Bug-apl] multiple inner product Jay Foad
- Re: [Bug-apl] multiple inner produ... Kacper Gutowski
- Re: [Bug-apl] multiple inner p... Jay Foad
- Re: [Bug-apl] multiple inn... Kacper Gutowski
- Re: [Bug-apl] multiple inn... Jay Foad
- Re: [Bug-apl] multiple inner product Juergen Sauermann
- Re: [Bug-apl] multiple inner product Jay Foad
- Re: [Bug-apl] multiple inner product Juergen Sauermann