Early registration for Wikimania 2008 is now open. [hide]

# APL function symbols

The following APL functions are given, separated into their monadic and dyadic forms. For non-standard characters, a hexadecimal UCS-2 index value is given. The names given are the original names of the functions implemented by the symbol. Some functions, such as the monadic shape and index generator functions, are commonly known by the name of the symbol (rho and iota).

For the symbols on this page to be displayed properly, it may be necessary to use a CSS2-compliant browser such as Mozilla Firefox or Safari.

## Contents

[hide]

Name Example Meaning UCS-2 Hex
Roll  ?B Integer selected randomly from 1 through B (see note) 003F
Ceiling B Least integer greater than or equal to B 2308
Floor B Greatest integer less than or equal to B 230A
Shape B Number of components in each dimension of B 2374
Not B Logical: ∼1 is 0, ∼0 is 1 223C
Absolute value B Magnitude of B 2223
Index generator B Vector of integers from 1 to B (see note) 2373
Exponential B e to the B power 22C6
Negation B Changes sign of B 2212
Monadic plus +B No change to B 002B
Signum ×B ¯1 if B<0; 0 if B=0; 1 if B>0 00D7
Reciprocal ÷B 1 divided by B 00F7
Ravel ,B Reshapes B into a vector 002C
Matrix inverse B Inverse of B 2339
Pi times B Multiply by π 25CB
Logarithm B Natural logarithm of B 235F
Reversal B Reverse elements of B 233D
Reversal B Reverse elements of B along 1st dimension 2296
Grade up B Indices of B which will arrange B in ascending order 234B
Grade down B Indices of B which will arrange B in descending order 2352
Execute B Execute an APL expression 234E
Monadic format B A character matrix representation of B 2355
Monadic transpose B Reverse the dimensions of B 2349
Factorial  !B Product of integers 1 to B 0021

Note: The choice of index origin (a user selectable system variable, either 0 or 1) affects the result of roll and index functions. The tabulated definitions are valid when index origin is 1.

Name Example Meaning UCS-2 Hex
Add A+B Sum of A and B 002B
Subtract AB A minus B 2212
Multiply A×B A multiplied by B 00D7
Divide A÷B A divided by B 00F7
Exponentiation AB A raised to the B power 22C6
Circle AB Trigonometric functions of B selected by A
A=1: sin(B) A=2: cos(B) A=3: tan(B)
25CB
Deal A?B A distinct integers selected randomly from set 1 to B (see note) 003F
Membership AB 1 if A is present in B; otherwise 0 2208
Maximum AB The greater value of A or B 2308
Minimum AB The smaller value of A or B 230A
Reshape AB Array of shape A with data B 2374
Take AB Select the first A elements of B 2191
Drop AB Remove the first A elements of B 2193
Decode AB Value of a polynomial whose coefficients are B at A 22A5
Encode AB Base-A representation of the value of B 22A4
Residue AB The A modula value of B lying between A and 0 2223
Catenation A,B Elements of B appended to the elements of A 002C
Expansion A\B Insert zeros (or blanks) in B corresponding to zeros in A 005C
Compression A/B Select elements in B corresponding to ones in A 002F
Index of AB The location (index) of B in A; 1+⍴B if not found (see note) 2373
Matrix divide AB Solution to system of linear equations Ax = B 2339
Rotation AB The elements of B are rotated A positions 233D
Rotation AB The elements of B are rotated A positions in the 1st dimension 2296
Logarithm AB Logarithm of B to base A 235F
Dyadic format AB Format B into a character matrix according to A 2355
General transpose AB The dimensions of B are ordered by A 2349
Combinations A!B Number of combinations of B taken A at a time 0021
Less than A<B Comparison: 1 if true, 0 if false 003C
Less than or equal AB Comparison: 1 if true, 0 if false 2264
Equal A=B Comparison: 1 if true, 0 if false 003D
Greater than or equal AB Comparison: 1 if true, 0 if false 2265
Greater than A>B Comparison: 1 if true, 0 if false 003E
Not equal AB Comparison: 1 if true, 0 if false 2260
Or AB Logic: 0 if A and B are 0; 1 otherwise 2228
And AB Logic: 1 if A and B are 1; 0 otherwise 2227
Nor AB Logic: 1 if both A and B are 0; otherwise 0 2371
Nand AB Logic: 0 if both A and B are 1; otherwise 1 2372

Note: The choice of index origin (a user selectable system variable, either 0 or 1) affects the result of deal and index functions. The tabulated definitions are valid when index origin is 1.