instruction_list 

algebra: instruction_list


argument

The instruction to assign a register to a subroutine argument reads:

Description Codes
R(j) \→ Arg(k) i 8 j k

The first code (i) can have the values 0 and 1, 1 requests the originating register not to be changed on return from the call.


arithmetic

Instruction list codes for operators:

Numerical binary arithmetic:

Description Codes
R(i) + R(j) \→ R(k) i 1 j k
R(i) - R(j) \→ R(k) i 2 j k
R(i) * R(j) \→ R(k) i 3 j k
R(i) / R(j) \→ R(k) i 4 j k
R(i) ^ R(j) \→ R(k) i 5 j k

Comparisons resulting in a logical, where numeric equality and non-equality are tested at a precision of 10\<SUP\>-5\</SUP\> or 10\<SUP\>-10\</SUP\> depending on the machine precision:

Description Codes
R(i) = R(j) \&rarr; R(k) i 10 j k
R(i) \&ne; R(j) \&rarr; R(k) i 11 j k
R(i) \&lt; R(j) \&rarr; R(k) i 12 j k
R(i) \&le; R(j) \&rarr; R(k) i 13 j k
R(i) \&gt; R(j) \&rarr; R(k) i 14 j k
R(i) \&ge; R(j) \&rarr; R(k) i 15 j k

Logical binary arithmetic:

Description Codes
R(i) and R(j) \&rarr; R(k) i 16 j k
R(i) or R(j) \&rarr; R(k) i 17 j k

call

The instruction to call a procedure which has n arguments and has the identification code m, reads:

Description Codes
Call procedure m with n args m 9 n 0

The procedures are listed separately, see Call.


functions

Codes for the various intrinsic functions.

Numerical functions:

Description Codes Name
trailing R(i) \&rarr; R(j) -11 6 i j TRAILING
arctanh R(i) \&rarr; R(j) -9 6 i j ARCTANH
arccosh R(i) \&rarr; R(j) -8 6 i j ARCCOSH
arcsinh R(i) \&rarr; R(j) -7 6 i j ARCSINH
- R(i) \&rarr; R(j) -6 6 i j -
\&radic; R(i) \&rarr; R(j) -5 6 i j SQRT
arctan R(i) \&rarr; R(j) -4 6 i j ARCTAN
arccos R(i) \&rarr; R(j) -3 6 i j ARCCOS
arcsin R(i) \&rarr; R(j) -2 6 i j ARCSIN
log R(i) \&rarr; R(j) -1 6 i j LOG
exp R(i) \&rarr; R(j) 1 6 i j EXP
sin R(i) \&rarr; R(j) 2 6 i j SIN
cos R(i) \&rarr; R(j) 3 6 i j COS
tan R(i) \&rarr; R(j) 4 6 i j TAN
| R(i) | \&rarr; R(j) 5 6 i j ABS
+ R(i) \&rarr; R(j) 6 6 i j -
sinh R(i) \&rarr; R(j) 7 6 i j SINH
cosh R(i) \&rarr; R(j) 8 6 i j COSH
tanh R(i) \&rarr; R(j) 9 6 i j TANH
entier R(i) \&rarr; R(j) 11 6 i j ENTIER
\&Sigma; R(i) \&rarr; R(j) 13 6 i j SUM
\&Pi; R(i) \&rarr; R(j) 14 6 i j PRODUCT
Landau R(i) \&rarr; R(j) 18 6 i j LANDAU
Minimum of R(i) \&rarr; R(j) 19 6 i j MINIMUM
Maximum of R(i) \&rarr; R(j) 20 6 i j MAXIMUM
Row of 1 to R(i) \&rarr; R(j) 40 6 i j ROW
Mean of R(i) \&rarr; R(j) 41 6 i j MEAN
RMS of R(i) \&rarr; R(j) 42 6 i j RMS
Size of R(i) \&rarr; R(j) 43 6 i j SIZE
Row of R(i) zeroes \&rarr; R(j) 44 6 i j ZEROES
Row of R(i) ones \&rarr; R(j) 45 6 i j ONES
Existence of file R(i) \&rarr; R(j) 46 6 i j EXIST
\&Gamma; R(i) \&rarr; R(j) 47 6 i j GAMMA

Logical functions:

Description Codes Name
not R(i) \&rarr; R(j) 10 6 i j NOT

Type conversions:

Description Codes Name
string R(i) \&rarr; number R(j) -12 6 i j NUMBER
formatted R(i) \&rarr; R(j) 12 6 i j STRING
number R(i) \&rarr; string R(j) 51 6 i j REF_STRING
number R(i) \&rarr; histogram R(j) 54 6 i j REF_HISTOGRAM
number R(i) \&rarr; matrix R(j) 55 6 i j REF_MATRIX
name global R(i) \&rarr; string R(j) 16 6 i j GLOBAL
type of R(i) \&rarr; string R(j) 17 6 i j TYPE

Random numbers:

Description Codes Name
Uniform random number \&rarr; R(j) 21 6 - j RND_UNIFORM
Gaussian random number \&rarr; R(j) 22 6 - j RND_GAUSS, RND_NORMAL
Exp. random number \&rarr; R(j) 23 6 i j RND_EXPONENTIAL, RND_EXP
Poisson random number \&rarr; R(j) 24 6 i j RND_POISSON
Landau random number \&rarr; R(j) 25 6 i j RND_LANDAU
Polya, \&theta; R(i) \&rarr; R(j) 26 6 i j RND_POLYA
Function random number \&rarr; R(j) 27 6 i j RND_FUNCTION
Histogram random R(i) \&rarr; R(j) 28 6 i j RND_HISTOGRAM

The random number generators RND_EXPONENTIAL and RND_POISSON have the mean of the distribution as argument. The argument of RND_POLYA is the "theta" parameter. These arguments are optional, they default to 1. They can generate random number sequences of different data types.

RND_HISTOGRAM takes an Histogram as argument and always returns a single random number.


goto

The jump instruction reads:

Description Codes
If R(i) Goto Ins(R(j)) i 7 j 0

A direct jumps are obtained by setting R(i) to 1 (i.e. i=-1). Setting R(i) to 0 (i.e. i=0) is a no-operation code because the jump would never occur.

A value out of range for R(j) (typically 0) is a alternative for return. You are allowed to modify the value of R(j) during execution.


results

The instruction to assign a register to an output variable reads:

Description Codes
R(i) \&rarr; output variable (j) 0 0 i j

return

To return to the calling procedure, to stop procedure execution, and to stop program execution, the following instructions can be used:

Description Codes
Return to calling procedure i -9 0 0
Stop procedure execution i -9 1 0
Stop program execution i -9 2 0

These instructions are referred to as Return, Exit and Quit. The statement is executed if R(i) has the value 1, if R(i) is 0, the statement is skipped, otherwise an error condition is raised.


Go to the top level, to algebra, to instruction_list, to the topic index, to the table of contents, or to the full text.

Formatted on 21/01/18 at 16:55.