4,114

edits

Jump to navigation
Jump to search

m

→Differences between dialects

(→Model) |
|||

Line 116: | Line 116: | ||

== Differences between dialects == | == Differences between dialects == | ||

Implementations differ on the exact behaviour of inner product when the right operand is not a [[scalar function]]. It follows from page 121 of the ISO/IEC 13751:2001(E) [[standard]] specifies that <source lang=apl inline>X f.g Y</source> is equivalent to <source lang=apl inline>⊃⍤0 f/¨ (⊂[⍴⍴x]x)∘.g ⊂[1]y</source>. This is indeed what [[APL2]], [[APLX]], and [[ngn/apl]] follow, while [[Dyalog APL]] and [[GNU APL]] use <source lang=apl inline>⊃⍤0 f/¨ (⊂[⍴⍴x]x)∘.(g¨) ⊂[1]y</source> | Implementations differ on the exact behaviour of inner product when the right operand is not a [[scalar function]]. It follows from page 121 of the ISO/IEC 13751:2001(E) [[standard]] specifies that <source lang=apl inline>X f.g Y</source> is equivalent to <source lang=apl inline>⊃⍤0 f/¨ (⊂[⍴⍴x]x)∘.g ⊂[1]y</source>. This is indeed what [[APL2]], [[APLX]], and [[ngn/apl]] follow, while [[Dyalog APL]] and [[GNU APL]] use <source lang=apl inline>⊃⍤0 f/¨ (⊂[⍴⍴x]x)∘.(g¨) ⊂[1]y</source>, as [[Roger Hui]] writes:<ref>[[Roger Hui]]. ''inner product''. Internal Dyalog email. 24 July 2020.</ref> | ||

as [[Roger Hui]] writes:<ref>[[Roger Hui]]. ''inner product''. Internal Dyalog email. 24 July 2020.</ref> | |||

<blockquote> | <blockquote> | ||

The following dop models inner product in Dyalog APL, with caveats. If you find a case where <source lang=apl inline>f.g</source> differs from <source lang=apl inline>f IP g</source>, not covered by the caveats, I'd be interested. | The following dop models inner product in Dyalog APL, with caveats. If you find a case where <source lang=apl inline>f.g</source> differs from <source lang=apl inline>f IP g</source>, not covered by the caveats, I'd be interested. |

Retrieved from ‘https://aplwiki.com/wiki/Special:MobileDiff/8107’