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
CeilingLeast integer greater than or equal to B
FloorGreatest integer less than or equal to B
ShapeNumber of components in each dimension of B
NotLogical: ∼1 is 0, ∼0 is 1
Absolute valueMagnitude of B
Index generatorVector of the first B integers
Exponentiale to the B power
NegationChanges 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 inverseInverse of matrix B
Pi timesMultiply by π
LogarithmNatural logarithm of B
ReversalReverse elements of B along last axis
ReversalReverse elements of B along first axis
Grade upIndices of B which will arrange B in ascending order
Grade downIndices of B which will arrange B in descending order
ExecuteExecute an APL expression
Monadic formatA character representation of B
Monadic transposeReverse the axes of B
Factorial !Product of integers 1 to B

Dyadic functions

NameNotationMeaning
Add+Sum of A and B
SubtractA minus B
Multiply×A multiplied by B
Divide÷A divided by B
ExponentiationA raised to the B power
CircleTrigonometric 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
Membership1 for elements of A present in B; 0 where not.
MaximumThe greater value of A or B
MinimumThe smaller value of A or B
ReshapeArray of shape A with data B
TakeSelect the first (or last) A elements of B according to ×A
DropRemove the first (or last) A elements of B according to ×A
DecodeValue of a polynomial whose coefficients are B at A
EncodeBase-A representation of the value of B
ResidueB 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 ofThe location (index) of B in A; 1+⌈/⍳⍴A if not found
Matrix divideSolution to system of linear equations Ax = B
RotationThe elements of B are rotated A positions
RotationThe elements of B are rotated A positions along the first axis
LogarithmLogarithm of B to base A
Dyadic formatFormat B into a character matrix according to A
General transposeThe 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 equalComparison: 1 if true, 0 if false
Equal=Comparison: 1 if true, 0 if false
Greater than or equalComparison: 1 if true, 0 if false
Greater than>Comparison: 1 if true, 0 if false
Not equalComparison: 1 if true, 0 if false
OrLogic: 0 if A and B are 0; 1 otherwise
AndLogic: 1 if A and B are 1; 0 otherwise
NorLogic: 1 if both A and B are 0; otherwise 0
NandLogic: 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