Table of Contents
List of Examples
math_pow usagemath_logN usagemath_log2 usagemath_log10 usagemath_sqrt usageTable of Contents
This module provides a collection of functions for math operations.
Note that the result values are casted to intger (long value), being the type supported by the config variables.
The exponentiation function, computing the base raised to power, storing in res.
This function can be used from ANY_ROUTE.
Example 1.1. math_pow usage
...
math_pow("2", "10", "$var(res)");
$var(base) = 2;
$var(power) = 10;
math_pow("$var(base)", "$var(power)", "$var(res)");
...
The function computes the natural logarithm of x and stores the result in res.
This function can be used from ANY_ROUTE.
Example 1.2. math_logN usage
...
math_logN("10", "$var(res)");
$var(x) = 10;
math_logN("$var(x)", "$var(res)");
...
The function computes the base-2 logarithm of x and stores the result in res.
This function can be used from ANY_ROUTE.
Example 1.3. math_log2 usage
...
math_log2("16", "$var(res)");
$var(x) = 16;
math_log2("$var(x)", "$var(res)");
...