APL\360: Difference between revisions

Jump to navigation Jump to search
432 bytes added ,  20:55, 10 September 2022
m
Text replacement - "<source" to "<syntaxhighlight"
(Merge the two Computer History Museum links under "source code")
m (Text replacement - "<source" to "<syntaxhighlight")
Line 2: Line 2:
| title                    = ''APL''\360
| title                    = ''APL''\360
| array model              = [[flat array model|flat]] without [[box|boxes]]
| array model              = [[flat array model|flat]] without [[box|boxes]]
| index origin            = <source lang=apl inline>)ORIGIN</source> 0 or 1 (later <source lang=apl inline>⎕IO</source>)
| index origin            = <syntaxhighlight lang=apl inline>)ORIGIN</source> 0 or 1 (later <syntaxhighlight lang=apl inline>⎕IO</source>)
| function styles          = [[defined function]]
| function styles          = [[defined function]]
| numeric types            = floats (64-bit [[wikipedia:IBM_hexadecimal_floating_point|HFP]])
| numeric types            = floats (64-bit [[wikipedia:IBM_hexadecimal_floating_point|HFP]])
Line 52: Line 52:
! Glyph                              !! Monadic              !! Dyadic
! Glyph                              !! Monadic              !! Dyadic
|-
|-
| <source lang=apl inline>+</source> || [[Conjugate]]        || [[Plus]]
| <syntaxhighlight lang=apl inline>+</source> || [[Conjugate]]        || [[Plus]]
|-
|-
| <source lang=apl inline>-</source> || [[Negate|Negative]]  || [[Subtract|Minus]]
| <syntaxhighlight lang=apl inline>-</source> || [[Negate|Negative]]  || [[Subtract|Minus]]
|-
|-
| <source lang=apl inline>×</source> || [[Signum]]            || [[Times]]
| <syntaxhighlight lang=apl inline>×</source> || [[Signum]]            || [[Times]]
|-
|-
| <source lang=apl inline>÷</source> || [[Reciprocal]]        || [[Divide]]
| <syntaxhighlight lang=apl inline>÷</source> || [[Reciprocal]]        || [[Divide]]
|-
|-
| <source lang=apl inline>⌈</source> || [[Ceiling]]          || [[Maximum]]
| <syntaxhighlight lang=apl inline>⌈</source> || [[Ceiling]]          || [[Maximum]]
|-
|-
| <source lang=apl inline>⌊</source> || [[Floor]]            || [[Minimum]]
| <syntaxhighlight lang=apl inline>⌊</source> || [[Floor]]            || [[Minimum]]
|-
|-
| <source lang=apl inline>*</source> || [[Exponential]]      || [[Power]]
| <syntaxhighlight lang=apl inline>*</source> || [[Exponential]]      || [[Power]]
|-
|-
| <source lang=apl inline>⍟</source> || [[Natural logarithm]] || [[Logarithm]]
| <syntaxhighlight lang=apl inline>⍟</source> || [[Natural logarithm]] || [[Logarithm]]
|-
|-
| <source lang=apl inline>|</source> || [[Magnitude]]        || [[Residue]]
| <syntaxhighlight lang=apl inline>|</source> || [[Magnitude]]        || [[Residue]]
|-
|-
| <source lang=apl inline>?</source> || [[Roll]]              || [[Deal]]
| <syntaxhighlight lang=apl inline>?</source> || [[Roll]]              || [[Deal]]
|-
|-
| <source lang=apl inline>○</source> || [[Pi times]]          || [[Circle function|Circular]]
| <syntaxhighlight lang=apl inline>○</source> || [[Pi times]]          || [[Circle function|Circular]]
|-
|-
| <source lang=apl inline>!</source> || [[Factorial]]        || [[Binomial coefficient]]
| <syntaxhighlight lang=apl inline>!</source> || [[Factorial]]        || [[Binomial coefficient]]
|-
|-
| <source lang=apl inline>~</source> || [[Not]]              ||
| <syntaxhighlight lang=apl inline>~</source> || [[Not]]              ||
|-
|-
| <source lang=apl inline>∧</source> ||                      || [[And]]
| <syntaxhighlight lang=apl inline>∧</source> ||                      || [[And]]
|-
|-
| <source lang=apl inline>∨</source> ||                      || [[Or]]
| <syntaxhighlight lang=apl inline>∨</source> ||                      || [[Or]]
|-
|-
| <source lang=apl inline>⍲</source> ||                      || [[Nand]]
| <syntaxhighlight lang=apl inline>⍲</source> ||                      || [[Nand]]
|-
|-
| <source lang=apl inline>⍱</source> ||                      || [[Nor]]
| <syntaxhighlight lang=apl inline>⍱</source> ||                      || [[Nor]]
|-
|-
| <source lang=apl inline><</source> ||                      || [[Less]]
| <syntaxhighlight lang=apl inline><</source> ||                      || [[Less]]
|-
|-
| <source lang=apl inline>≤</source> ||                      || [[Not greater]]
| <syntaxhighlight lang=apl inline>≤</source> ||                      || [[Not greater]]
|-
|-
| <source lang=apl inline>=</source> ||                      || [[Equal]]
| <syntaxhighlight lang=apl inline>=</source> ||                      || [[Equal]]
|-
|-
| <source lang=apl inline>≥</source> ||                      || [[Not less]]
| <syntaxhighlight lang=apl inline>≥</source> ||                      || [[Not less]]
|-
|-
| <source lang=apl inline>></source> ||                      || [[Greater]]
| <syntaxhighlight lang=apl inline>></source> ||                      || [[Greater]]
|-
|-
| <source lang=apl inline>≠</source> ||                      || [[Not equal]]
| <syntaxhighlight lang=apl inline>≠</source> ||                      || [[Not equal]]
|-
|-
| <source lang=apl inline>⍴</source> || [[Shape|Size]]        || [[Reshape]]
| <syntaxhighlight lang=apl inline>⍴</source> || [[Shape|Size]]        || [[Reshape]]
|-
|-
| <source lang=apl inline>,</source> || [[Ravel]]            || [[Catenate]]
| <syntaxhighlight lang=apl inline>,</source> || [[Ravel]]            || [[Catenate]]
|-
|-
| <source lang=apl inline>[]</source>||                      || [[Bracket indexing|Indexing]]
| <syntaxhighlight lang=apl inline>[]</source>||                      || [[Bracket indexing|Indexing]]
|-
|-
| <source lang=apl inline>⍳</source> || [[Index generator]]  || [[Index of]]
| <syntaxhighlight lang=apl inline>⍳</source> || [[Index generator]]  || [[Index of]]
|-
|-
| <source lang=apl inline>↑</source> ||                      || [[Take]]
| <syntaxhighlight lang=apl inline>↑</source> ||                      || [[Take]]
|-
|-
| <source lang=apl inline>↓</source> ||                      || [[Drop]]
| <syntaxhighlight lang=apl inline>↓</source> ||                      || [[Drop]]
|-
|-
| <source lang=apl inline>⍋</source> || [[Grade up]]  (allows axis) ||
| <syntaxhighlight lang=apl inline>⍋</source> || [[Grade up]]  (allows axis) ||
|-
|-
| <source lang=apl inline>⍒</source> || [[Grade down]] (allows axis) ||
| <syntaxhighlight lang=apl inline>⍒</source> || [[Grade down]] (allows axis) ||
|-
|-
| <source lang=apl inline>/</source> ||                      ||rowspan=2| [[Compress]]<br>(allows axis)
| <syntaxhighlight lang=apl inline>/</source> ||                      ||rowspan=2| [[Compress]]<br>(allows axis)
|-
|-
| <source lang=apl inline>⌿</source> ||
| <syntaxhighlight lang=apl inline>⌿</source> ||
|-
|-
| <source lang=apl inline>\</source> ||                      ||rowspan=2| [[Expand]]<br>(allows axis)
| <syntaxhighlight lang=apl inline>\</source> ||                      ||rowspan=2| [[Expand]]<br>(allows axis)
|-
|-
| <source lang=apl inline>⍀</source> ||
| <syntaxhighlight lang=apl inline>⍀</source> ||
|-
|-
| <source lang=apl inline>⌽</source> ||rowspan=2| [[Reverse]]<br>(allows axis) ||rowspan=2| [[Rotate]]<br>(allows axis)
| <syntaxhighlight lang=apl inline>⌽</source> ||rowspan=2| [[Reverse]]<br>(allows axis) ||rowspan=2| [[Rotate]]<br>(allows axis)
|-
|-
| <source lang=apl inline>⊖</source>
| <syntaxhighlight lang=apl inline>⊖</source>
|-
|-
| <source lang=apl inline>⍉</source> ||colspan=2| [[Transpose]]
| <syntaxhighlight lang=apl inline>⍉</source> ||colspan=2| [[Transpose]]
|-
|-
| <source lang=apl inline>∊</source> ||                      || [[Membership]]
| <syntaxhighlight lang=apl inline>∊</source> ||                      || [[Membership]]
|-
|-
| <source lang=apl inline>⊥</source> ||                      || [[Decode]]
| <syntaxhighlight lang=apl inline>⊥</source> ||                      || [[Decode]]
|-
|-
| <source lang=apl inline>⊤</source> ||                      || [[Encode]]
| <syntaxhighlight lang=apl inline>⊤</source> ||                      || [[Encode]]
|}
|}


Line 142: Line 142:
! Glyph                              !! Valence !! Monadic call            !! Dyadic call
! Glyph                              !! Valence !! Monadic call            !! Dyadic call
|-
|-
| <source lang=apl inline>/</source>  || Monadic ||rowspan=2| [[Reduction]]<br>(allows axis) ||
| <syntaxhighlight lang=apl inline>/</source>  || Monadic ||rowspan=2| [[Reduction]]<br>(allows axis) ||
|-
|-
| <source lang=apl inline>⌿</source>  || Monadic ||
| <syntaxhighlight lang=apl inline>⌿</source>  || Monadic ||
|-
|-
| <source lang=apl inline>.</source>  || Dyadic  ||                        || [[Inner product]]
| <syntaxhighlight lang=apl inline>.</source>  || Dyadic  ||                        || [[Inner product]]
|-
|-
| <source lang=apl inline>∘.</source> || Monadic ||                        || [[Outer product]]
| <syntaxhighlight lang=apl inline>∘.</source> || Monadic ||                        || [[Outer product]]
|-
|-
| <source lang=apl inline>[]</source> || Monadic ||colspan=2| [[Function axis|Axis]]
| <syntaxhighlight lang=apl inline>[]</source> || Monadic ||colspan=2| [[Function axis|Axis]]
|}
|}


Navigation menu