Arithmetic library

<< Click to Display Table of Contents >>

Navigation:  Project > Scripts > ST language > Embedded functions >

Arithmetic library

Previous pageReturn to chapter overviewNext page

sqrt(Input) - arithmetic operation square root of the input value.

pow(Input1, Input2) - arithmetic operation power for input values. output = Input1^Input2.

log(Input1, Input2) - arithmetic operation logarithm of the input value (Output = LogInput2Input).

ln(Input1) - arithmetic operation ln(natural logarithm) of the input value (Output = Ln(Input)).

abs(Input) - used to arithmetic operation absolute for input value (Output = |Input|).

sign(Input) - used to arithmetic operation sign for input value (Output = -Input).

int(Input) - used to arithmetic operation for getting integer part of the input value (Output = int(Input)).

random(Input1, Input2) - arithmetic operation for generating random values in the range between Input1 and Input2.

 

Example:

int a = pow(5, 2);

print(a);

Response:

a = 25;