Standard Mathematical Functions

Mathematical functions consist of the function name and one or two arguments. An argument can be any number or variable name. A mathematical function applies the function, which it represents, to the argument(s).

r:=FCT(x,y),r:=FCT(z)

In the example above:

If the argument(s) are complex numbers (for example in an AC simulation), the functions RAD, DEG, DEGEL, INT, REM, and LOOKUP consider only the real part.

Warning:

When entering these functions, do not leave spaces between the function arguments and the open parenthesis mark. For example: SIN(x) not SIN (x).

Note:

For backward compatibility, the functions ARCSIN, ARCCOS, ARCTAN, SQU, LOOKUP, INTEG, ROOT(x), RAD, DEG, and MOD(x) are still recognized in pure SML text.

The following tables list the standard mathematical functions included in Twin Builder:

Trigonometric Functions

Note:

When defining arguments for trigonometric functions, you must consider poles to avoid potential errors during a simulation.


Note:

With the R26.1 release, the functionality of atan2(arg1,arg2) has been changed to reflect the common usage, where arg1=Y and arg2=X. For the support of the legacy Simplorer functionality, use the function atan2xy(arg1,arg2) instead. During the loading of legacy projects and models (R25.2 or older) the calls of the legacy atan2 functions will be translated into atan2xy automatically (where permitted).

Arithmetic Functions



Exponential Functions



Complex Functions



Conversion Functions



Note:

The special conversion functions gel50, gel16, gel, mod360, mod60 have been replaced in Simplorer7 and later by generic functions degel(x,y) and mod(x,y).

Rounding Functions



Conditional Functions



Related Topics 

Predefined Constants

Operators