APL Symbols Meaning

,

This page is a list of of APL symbol's meanings.

Monadic Functions

NameNotationMeaning
Roll?One integer selected randomly from the first B integers
Ceiling⌈Least integer greater than or equal to B
Floor⌊Greatest integer less than or equal to B
Shape⍴Number of components in each dimension of B
Not∼Logical: ∼1 is 0, ∼0 is 1
Absolute value∣Magnitude of B
Index generator⍳Vector of the first B integers
Exponential⋆e to the B power
Negationβˆ’Changes sign of B
Identity+No change to B
SignumΓ—Β―1 if B<0; 0 if B=0; 1 if B>0
ReciprocalΓ·1 divided by B
Ravel,Reshapes B into a vector
Matrix inverse⌹Inverse of matrix B
Pi timesβ—‹Multiply by Ο€
Logarithm⍟Natural logarithm of B
Reversal⌽Reverse elements of B along last axis
ReversalβŠ–Reverse elements of B along first axis
Grade up⍋Indices of B which will arrange B in ascending order
Grade down⍒Indices of B which will arrange B in descending order
Execute⍎Execute an APL expression
Monadic format⍕A character representation of B
Monadic transpose⍉Reverse the axes of B
Factorial !Product of integers 1 to B

Dyadic functions

NameNotationMeaning
Add+Sum of A and B
Subtractβˆ’A minus B
MultiplyΓ—A multiplied by B
DivideΓ·A divided by B
Exponentiation⋆A raised to the B power
Circleβ—‹Trigonometric functions of B selected by A. A=1: sin(B) A=2: cos(B) A=3: tan(B)
Deal?A distinct integers selected randomly from the first B integers
Membership∈1 for elements of A present in B; 0 where not.
Maximum⌈The greater value of A or B
Minimum⌊The smaller value of A or B
Reshape⍴Array of shape A with data B
Take↑Select the first (or last) A elements of B according to Γ—A
Drop↓Remove the first (or last) A elements of B according to Γ—A
DecodeβŠ₯Value of a polynomial whose coefficients are B at A
Encode⊀Base-A representation of the value of B
Residue∣B modulo A
Catenation,Elements of B appended to the elements of A
Expansion\Insert zeros (or blanks) in B corresponding to zeros in A
Compression/Select elements in B corresponding to ones in A
Index of⍳The location (index) of B in A; 1+⌈/⍳⍴A if not found
Matrix divide⌹Solution to system of linear equations Ax = B
Rotation⌽The elements of B are rotated A positions
RotationβŠ–The elements of B are rotated A positions along the first axis
Logarithm⍟Logarithm of B to base A
Dyadic format⍕Format B into a character matrix according to A
General transpose⍉The axes of B are ordered by A
Combinations!Number of combinations of B taken A at a time
Less than<Comparison: 1 if true, 0 if false
Less than or equal≀Comparison: 1 if true, 0 if false
Equal=Comparison: 1 if true, 0 if false
Greater than or equalβ‰₯Comparison: 1 if true, 0 if false
Greater than>Comparison: 1 if true, 0 if false
Not equal≠Comparison: 1 if true, 0 if false
Or∨Logic: 0 if A and B are 0; 1 otherwise
And∧Logic: 1 if A and B are 1; 0 otherwise
Nor⍱Logic: 1 if both A and B are 0; otherwise 0
Nand⍲Logic: 0 if both A and B are 1; otherwise 1

Operators and axis indicator

NameSymbolExampleMeaning (of example)
Reduce (last axis)/+/BSum across B
Reduce (first axis)⌿+⌿BSum down B
Scan (last axis)\+\BRunning sum across B
Scan (first axis)⍀+⍀BRunning sum down B
Inner productβ—‡A+.Γ—BMatrix product of A and B
Outer product∘A∘.Γ—BOuter product of A and B

Sample APL source code: apl_cgi_script.apl

How to Create a APL or Math Symbols Keyboard Layout ⌨

For full detail, see: APL syntax and symbols

blog comments powered by Disqus