Ende     Zurück     Inhalt

References

Infix Operators

Infix operators are special single signs and stand between the expressions they connect (e.g. ). Obviously, to indicate precedence, brackets are allowed.

The higher the precedence of an operation, the higher the corresponding number in the tables below. Operations with the same number have equal precedences.

Arithmetical Infix Operators

Sym Effect Preced. Error Calc
+ Addition 0 yes
- Subtraction 0 yes
* Multiplication 1 yes
/ Division 1 yes
^ to the power of 2 yes
% partial derivative of the expression standing on the left hand side with respect to the variable on the right 3 yes

Infix Operators for Table Manipulation

Sym Effect Preced. Error Calc
: The first operand is a table, the second an integer. t:n shifts t by n lines to the top. The first n lines are lost. 3 no
! The first operand is a table, the second is arbitrary but an integer. The second operand determines which element(s) of the first one are returned. 3 no
? Opposite of !: Specified elements are not returned 3 no
& The operator connects two tables 3 no

Special Operator for Linear Regression

The operator "|" takes two tables as operands: "" treats as the co-ordinates of a point and calculates the regression line using the "least square fit" method. It always returns a table with four elements. Its first element contains the slope of the line, the second one the error of the slope. The third and fourth elements contain in the same way the intersection point with the Y axis and its error. If you need these elements separately, you can extract them with the operator "!". "" is the slope of the regression line, for example.

Prefix Operators

Prefix operators are either single specials signs as well or a word consisting of upper case characters. They stand in front of the expressions to which they refer (e.g. or , ). Brackets are optional. Prefix functions always have the highest precedence (e.g. ).

Name Effect Error Calc
- returns the negative argument yes
/ the inverse yes
SQR square yes
SQRT square root yes
LN natural logarithm yes
EXP exponential function yes
COS cosine yes
SIN sine yes
TAN tangent yes
ASIN arc sine yes
ACOS arc cosine yes
ATAN arc tangent yes
ABS absolute yes
SGN sign function no
SUM returns the sum of all table elements no
INT
("discrete integral")
no
MIN returns the minimum value in a table no
MAX returns the maximum value in a table no
LEN returns the length of the table yes
IDX(tb) returns a table of the same length containing the indices () yes
IDX(sc) takes an integer and returns a table containing the indices 1..sc yes
FFTH(tb) takes a table whose length must be a power of two and returns the Fourier transform of tb.[3] no
FFTR is the inverse of the FFTH and takes the same kind of parameters. no



[3]  The Fourier transform of a table containing n entries returns again a table with n entries. Entry one consists of twice the constant term, the entries are the coefficients belonging to the cosine parts with respective frequencies , the remaining entries are the coefficients of the sine parts (frequencies ).



Weiter     Anfang