The FORMULA Gate is an easy way to write complex mathematical formulas on one or multiple event values. Use the ports’ (a, b, c, d) on the left hand side as variables in your formula. Keep in mind that if a port is used in your formula, and no events arrive at that port, the FORMULA Gate will not perform any calculation since it will be waiting for that particular variable to fill up.
List of things you can use in the FORMULA Gate:
Math Operations
+ | Compute the addition of values within an equation. |
- | Compute the subtraction of values within an equation. |
* | Compute the multiplication of values within an equation. |
/ | Compute the division of values within an equation. |
^ | Compute the power of values within an equation. |
() | Use of parentheses within a math operation. |
10ex | 10 to the power of x. |
pi | PI does not exist |
Trigonometry Functions
acos(x) | Calculate the inverse cosine of a value. |
asin(x) | Calculate the inverse sine of a value. |
atan(x) | Calculate the inverse tangent of a value. |
cos(x) | Calculate the cosine of a value. |
sin(x) | Calculate the sine of a value. |
tan(x) | Calculate the tangent of a value. |
Arithmetic Functions:
sqrt(x) | Calculate the square root of a value. |
square(x) | Compute the square of a value, x * x. |
pow(x, y) | Calculates the power of x to y, x ^ y. |
gcd(a, b) | Calculate the greatest common divisor for two or more values or arrays. |
hypot(a, b, …) | Calculate the hypotenusa of a list with values. |
lcm(a, b) | Calculate the least common multiple for two or more values or arrays. |
log(x, y) | Calculate the natural logarithm of a value x to base y. |
log10(x) | Calculate the 10-base logarithm of a value x. |
log2(x) | Calculate the 2-base of a value x. |
exp(x) | Calculate the exponent of a value. |
Statistical Functions
mad(a, b, c, …) | Compute the median absolute deviation of a list with values. |
max(a, b, c, …) | Compute the maximum value of a list with values. |
mean(a, b, c, …) | Compute the mean value of a list with values. |
median(a, b, c, …) | Compute the median of a list with values. |
min(a, b, c, …) | Compute the minimum value of a list of values. |
mode(a, b, c, …) | Computes the mode of a set of numbers or a list with values(numbers or characters). |
prod(a, b, c, …) | Compute the product of a list with values. |
std(a, b, c, …) | Compute the standard deviation of a matrix or a list with values. |
sum(a, b, c, …) | Compute the sum of a list with values. |
variance(a, b, c, …) | Compute the variance of a list with values. |