Difference between revisions of "Formula Specification in Templates"
Jump to navigation
Jump to search
Line 94: | Line 94: | ||
|''ACOT(Number)'' | |''ACOT(Number)'' | ||
|Returns the arccotangent of a number ⟨0; Pi⟩ | |Returns the arccotangent of a number ⟨0; Pi⟩ | ||
|''for X=1 ... | |''for X=1 ... DEGREES(ACOT(1))'' ''⇒ 45°'' | ||
|- | |- | ||
|ASIN | |ASIN | ||
Line 104: | Line 104: | ||
|''ATAN(Number)'' | |''ATAN(Number)'' | ||
|Returns the arctangent of a number ⟨-Pi/2; Pi/2⟩ | |Returns the arctangent of a number ⟨-Pi/2; Pi/2⟩ | ||
|''for X=1 ... | |''for X=1 ... DEGREES(ATAN(1))'' ''⇒ 45°'' | ||
|- | |- | ||
|COS | |COS | ||
|''COS(Angle[rad])'' | |''COS(Angle[rad])'' | ||
|Returns the cosine of the given angle in rad | |Returns the cosine of the given angle in rad | ||
|''for α=60° ... | |''for α=60° ... COS(RADIANS(60))'' ''⇒ 0.5'' | ||
|- | |- | ||
|SIN | |SIN | ||
|''SIN(Angle[rad])'' | |''SIN(Angle[rad])'' | ||
|Returns the sine of the given angle in rad | |Returns the sine of the given angle in rad | ||
|''for α=30° ... | |''for α=30° ... SIN(RADIANS(30))'' ''⇒ 0.5'' | ||
|- | |- | ||
|COT | |COT | ||
|''COT(Angle[rad])'' | |''COT(Angle[rad])'' | ||
|Returns the cotangent of an angle in rad | |Returns the cotangent of an angle in rad | ||
|''for α=45° ... | |''for α=45° ... COT(RADIANS(45))'' ''⇒ 1'' | ||
|- | |- | ||
|TAN | |TAN | ||
|''TAN(Angle[rad])'' | |''TAN(Angle[rad])'' | ||
|Returns the tangent of an angle in rad | |Returns the tangent of an angle in rad | ||
|''for α=45° ... | |''for α=45° ... TAN(RADIANS(45))'' ''⇒ 1'' | ||
|- | |- | ||
|EXP | |EXP | ||
| | |''EXP(Number)'' | ||
| | |''Returns e raised to the power of a given number'' | ||
| | |''EXP(1) ⇒ 2.71828'' | ||
|- | |- | ||
|LN | |LN | ||
| | |''LN(Number)'' | ||
| | |''Returns the natural logarithm of a number'' | ||
| | |''LN(1)) ⇒ 0; LN(EXP(1)) ⇒ 1'' | ||
|- | |- | ||
|LOG | |LOG | ||
| | |''LOG(Number;[Base=10])'' | ||
| | |''Returns the logarithm of a number to a specified base (10 if missing)'' | ||
| | |''LOG(1; 10) ⇒ 0; LOG(10; 10) ⇒ 1'' | ||
|- | |- | ||
|LOG10 | |LOG10 | ||
| | |''LOG10(Number)'' | ||
| | |''Returns the base-10 logarithm of a number'' | ||
| | |''LOG10(1) ⇒ 0; LOG10(10) ⇒ 1'' | ||
|- | |- | ||
|PI | |PI | ||
| | |''PI()'' | ||
| | |''Returns the value of pi'' | ||
| | |''PI() ⇒ 3.141592653'' | ||
|- | |- | ||
|POWER | |POWER | ||
| | |''POWER(Base;Number)'' | ||
| | |''Returns the result of a number raised to a power'' | ||
| | |''POWER(2;4) ⇒ 16'' | ||
|- | |- | ||
|SQR | |SQR | ||
| | |''SQR(Number)'' | ||
| | |''Returns the result of a squared number'' | ||
| | |''SQR(5) ⇒ 25; SQR(-5) ⇒ 25'' | ||
|- | |- | ||
|SQRT | |SQRT | ||
| | |''SQRT(Number)'' | ||
| | |''Returns a positive square root of a positive Number'' | ||
| | |''SQRT(36) ⇒ 6; SQRT(-36) ⇒ NAN'' | ||
|- | |- | ||
|SUM | |SUM | ||
| | |''SUM(Number1;Number2; ... )'' | ||
| | |''Returns the sum of a series of numbers'' | ||
| | |''Result is number (bold inputs linked to data '''X[0;1;2;3;4;5;6]'''):'' | ||
''SUM('''[X_PDL⇓2:⇓5]''') ... SUM('''⟨1; 2; 3; 4⟩''') ⇒ 10'' | |||
''SUM('''[X_PDL⇕]''') ⇒ 21'' | |||
|- | |- | ||
|'''<u>DEG</u>''' | |'''<u>DEG</u>''' |
Revision as of 14:38, 23 May 2023
List of formula specification using in Templates.
Categories of functions:
Logical
Name | Syntax, parameters | Description | Example |
---|---|---|---|
AND | AND(Boolean1;Boolean2; ... ) | Returns TRUE if all of its arguments are TRUE | AND(3=3;2=2) ⇒ TRUE |
OR | OR(Boolean1;Boolean2; ... ) | Returns TRUE if any of its arguments are TRUE | OR(3=4;2=3) ⇒ FALSE |
TRUE | TRUE() | Returns the logical value TRUE | IF(TRUE();1;2) ⇒ 1 |
FALSE | FALSE() | Returns the logical value FALSE | IF(FALSE();1;2) ⇒ 2 |
IF | IF(Test;Then;Else) | Specifies a logical test to perform
- inputs can be linked to data - result can be number, text, logical value |
Result is number (bold inputs linked to data X[0;1;2;3;4;5;6]):
IF(220>200;220-200;200-220) ⇒ 20 IF(120>MAX([X⇕]);120;-1) ⇒ 120 IF(MAX([X⇓2:⇓3])>[X⇓7];MAX([X⇓2:⇓3]);[X⇓7])) ⇒ 6 IF(MAX(⟨1;2⟩)>6;MAX(⟨1;2⟩);6) ⇒ 6 Result is text: Input [Coordinate Z] = 210;[GWT] = 180 IF([Coordinate Z]>0;"Above terrain";"Under terrain") ⇒ "Top above terrain" IF([GWT]<[Coordinate Z];"GWT under top of the test.";"Measure error.") ⇒ "GWT under top of the test." |
IFS | IFS(Test1;Then1;Test2;Then2; ... ;Else) | Checks whether one or more conditions are met and returns a value that corresponds to the first TRUE condition | Input [GWT] = 15
IFS([GWT]>8;10;[GWT]>6;9;[GWT]>3;8;-1) ⇒ 10 |
NOT | NOT(Boolean) | Reverses the logic of its argument | IF(NOT(5>6);175;155) ⇒ 175
IF(NOT(5>4);175;155) ⇒ 155 IF(NOT("A"="B");175;155)⇒ 175 |
SWITCH | SWITCH(Switch;Case1;Result1;Case2;Result2; ... ;[ Else ]) | Evaluates an expression against a list of values and returns the result corresponding to the first matching value. If there is no match, an optional default value may be returned | SWITCH(50>6;TRUE();44;FALSE();56;-111) ⇒ 44
SWITCH(30/6;3;120;4;220;5;320;420) ⇒ 320 |
Mathematical
Name | Syntax, parameters | Description | Example |
---|---|---|---|
ABS | ABS(Number) | Returns the absolute value of a number | ABS(120) ⇒ 120; ABS(-120) ⇒ 120 |
ACOS | ACOS(Number) | Returns the arccosine of a number ⟨-Pi/2; Pi/2⟩ | for X=0.5 ... DEGREES(ACOS(0.5)) ⇒ 60° |
ACOT | ACOT(Number) | Returns the arccotangent of a number ⟨0; Pi⟩ | for X=1 ... DEGREES(ACOT(1)) ⇒ 45° |
ASIN | ASIN(Number) | Returns the arcsine of a number ⟨-Pi/2; Pi/2⟩ | for X=0.5 ... DEGREES(ASIN(0.5)) ⇒ 30° |
ATAN | ATAN(Number) | Returns the arctangent of a number ⟨-Pi/2; Pi/2⟩ | for X=1 ... DEGREES(ATAN(1)) ⇒ 45° |
COS | COS(Angle[rad]) | Returns the cosine of the given angle in rad | for α=60° ... COS(RADIANS(60)) ⇒ 0.5 |
SIN | SIN(Angle[rad]) | Returns the sine of the given angle in rad | for α=30° ... SIN(RADIANS(30)) ⇒ 0.5 |
COT | COT(Angle[rad]) | Returns the cotangent of an angle in rad | for α=45° ... COT(RADIANS(45)) ⇒ 1 |
TAN | TAN(Angle[rad]) | Returns the tangent of an angle in rad | for α=45° ... TAN(RADIANS(45)) ⇒ 1 |
EXP | EXP(Number) | Returns e raised to the power of a given number | EXP(1) ⇒ 2.71828 |
LN | LN(Number) | Returns the natural logarithm of a number | LN(1)) ⇒ 0; LN(EXP(1)) ⇒ 1 |
LOG | LOG(Number;[Base=10]) | Returns the logarithm of a number to a specified base (10 if missing) | LOG(1; 10) ⇒ 0; LOG(10; 10) ⇒ 1 |
LOG10 | LOG10(Number) | Returns the base-10 logarithm of a number | LOG10(1) ⇒ 0; LOG10(10) ⇒ 1 |
PI | PI() | Returns the value of pi | PI() ⇒ 3.141592653 |
POWER | POWER(Base;Number) | Returns the result of a number raised to a power | POWER(2;4) ⇒ 16 |
SQR | SQR(Number) | Returns the result of a squared number | SQR(5) ⇒ 25; SQR(-5) ⇒ 25 |
SQRT | SQRT(Number) | Returns a positive square root of a positive Number | SQRT(36) ⇒ 6; SQRT(-36) ⇒ NAN |
SUM | SUM(Number1;Number2; ... ) | Returns the sum of a series of numbers | Result is number (bold inputs linked to data X[0;1;2;3;4;5;6]):
SUM([X_PDL⇓2:⇓5]) ... SUM(⟨1; 2; 3; 4⟩) ⇒ 10 SUM([X_PDL⇕]) ⇒ 21 |
DEG | |||
RAD | |||
ROUNDUP | |||
ROUNDDOWN |
Text
Name | Syntax, parameters | Description | Example |
---|---|---|---|
CONCAT | |||
LEFT | |||
RIGHT | |||
LENGTH | |||
FIND |
Statistical
Name | Syntax, parameters | Description | Example |
---|---|---|---|
AVERAGE | |||
MAX | |||
MIN | |||
PERCENTIL | |||
STDEV | |||
MODUS | |||
MEDIAN |
Matrix
Name | Syntax, parameters | Description | Example |
---|---|---|---|
LINEARTREND | |||
LINEARTRENDANDPOINTS | |||
LINEARTRENDSC | |||
LINEARTRENDSCANDPOINTS | |||
LINEARTRENDTOPOINTS | |||
SEMICIRCELTOPOINTS |