2,951
edits
mNo edit summary |
(→Primitives: Use 1968 contributed program version) |
||
Line 38: | Line 38: | ||
== Primitives == | == Primitives == | ||
APL\360 evolved rapidly during its early development within IBM and more slowly as it became available to outside users. Here we show the primitives described in its [http://www.softwarepreservation.org/projects/apl/Manuals/APL360CONTRIBUTEDPROGRAMLIBRARY/view documentation] in 1968 when it was first released as a stand-alone product (a [[wikipedia:IBM Type-III Library|Type-III Library]]). Later additions include [[Matrix Inverse]] and [[Matrix Divide]]; [[Execute]], [[Format]], and [[Scan]] introduced by [[APL.SV]]; and an [[Function axis|axis]] and [[Laminate]] form for the [[Catenate]] function. | |||
=== Functions === | === Functions === | ||
Line 52: | Line 54: | ||
| <source lang=apl inline>÷</source> || [[Reciprocal]] || [[Divide]] | | <source lang=apl inline>÷</source> || [[Reciprocal]] || [[Divide]] | ||
|- | |- | ||
| <source lang=apl inline> | | <source lang=apl inline>⌈</source> || [[Ceiling]] || [[Maximum]] | ||
|- | |- | ||
| <source lang=apl inline>⌊</source> || [[Floor]] || [[Minimum]] | | <source lang=apl inline>⌊</source> || [[Floor]] || [[Minimum]] | ||
|- | |- | ||
| <source lang=apl inline> | | <source lang=apl inline>*</source> || [[Exponential]] || [[Power]] | ||
|- | |- | ||
| <source lang=apl inline> | | <source lang=apl inline>⍟</source> || [[Natural logarithm]] || [[Logarithm]] | ||
|- | |- | ||
| <source lang=apl inline> | | <source lang=apl inline>|</source> || [[Magnitude]] || [[Residue]] | ||
|- | |- | ||
| <source lang=apl inline> | | <source lang=apl inline>?</source> || [[Roll]] || [[Deal]] | ||
|- | |- | ||
| <source lang=apl inline>○</source> || [[Pi times]] || [[Circle function|Circular | | <source lang=apl inline>○</source> || [[Pi times]] || [[Circle function|Circular]] | ||
|- | |- | ||
| <source lang=apl inline>!</source> || [[Factorial]] || [[Binomial]] | | <source lang=apl inline>!</source> || [[Factorial]] || [[Binomial coefficient]] | ||
|- | |- | ||
| <source lang=apl inline>~</source> || [[Not]] || | | <source lang=apl inline>~</source> || [[Not]] || | ||
Line 90: | Line 92: | ||
| <source lang=apl inline>≠</source> || || [[Not equal]] | | <source lang=apl inline>≠</source> || || [[Not equal]] | ||
|- | |- | ||
| <source lang=apl inline>⍴</source> || [[Shape| | | <source lang=apl inline>⍴</source> || [[Shape|Size]] || [[Reshape]] | ||
|- | |- | ||
| <source lang=apl inline>,</source> || [[Ravel]] || [[Catenate | | <source lang=apl inline>,</source> || [[Ravel]] || [[Catenate]] | ||
|- | |- | ||
| <source lang=apl inline> | | <source lang=apl inline>[]</source>|| || [[Indexing]] | ||
|- | |- | ||
| <source lang=apl inline> | | <source lang=apl inline>⍳</source> || [[Index generator]] || [[Index of]] | ||
| | |||
|- | |- | ||
| <source lang=apl inline>↑</source> || || [[Take]] | | <source lang=apl inline>↑</source> || || [[Take]] | ||
|- | |- | ||
| <source lang=apl inline>↓</source> || || [[Drop]] | | <source lang=apl inline>↓</source> || || [[Drop]] | ||
|- | |||
| <source lang=apl inline>⍋</source> || [[Grade up]] (allows axis) || | |||
|- | |||
| <source lang=apl inline>⍒</source> || [[Grade down]] (allows axis) || | |||
|- | |- | ||
| <source lang=apl inline>/</source> || ||rowspan=2| [[Compress]]<br>(allows axis) | | <source lang=apl inline>/</source> || ||rowspan=2| [[Compress]]<br>(allows axis) | ||
Line 112: | Line 116: | ||
| <source lang=apl inline>⍀</source> || | | <source lang=apl inline>⍀</source> || | ||
|- | |- | ||
| <source lang=apl inline> | | <source lang=apl inline>⌽</source> ||rowspan=2| [[Reverse]]<br>(allows axis) ||rowspan=2| [[Rotate]]<br>(allows axis) | ||
|- | |||
| <source lang=apl inline>⊖</source> | |||
|- | |- | ||
| <source lang=apl inline> | | <source lang=apl inline>⍉</source> ||colspan=2| [[Transpose]] | ||
|- | |- | ||
| <source lang=apl inline>∊</source> || || [[Membership]] | | <source lang=apl inline>∊</source> || || [[Membership]] | ||
|- | |- | ||
| <source lang=apl inline>⊥</source> || || [[Decode]] | | <source lang=apl inline>⊥</source> || || [[Decode]] | ||
|- | |- | ||
| <source lang=apl inline>⊤</source> || || [[Encode]] | | <source lang=apl inline>⊤</source> || || [[Encode]] | ||
|} | |} | ||
Line 143: | Line 139: | ||
|- | |- | ||
| <source lang=apl inline>⌿</source> || Monadic || | | <source lang=apl inline>⌿</source> || Monadic || | ||
|- | |- | ||
| <source lang=apl inline>.</source> || Dyadic || || [[Inner product]] | | <source lang=apl inline>.</source> || Dyadic || || [[Inner product]] |