Tap supports a number of common math functions. The key thing with the math functions, as with any function, is they are written inside parenthesis with the operator first.
Any value within a math function can be replaced with other math functions, as in:
(+ (- 41 1) 2). Which is more commonly noted as
(41 - 1 + 2). Tap uses the former notation to make it easier to combine more advanced formula functions.
(+ x y)
Add y to x.
Note: use sum to add more than two numbers
(- x y)
Subtract y from x.
(* x y)
Multiply two numbers.
(/ x y)
Divide x by y.
(% x y)
x mod y
(min x [y ...])
Takes an arbitrary number of parameters and returns the least number.
(max x [y ...])
Takes an arbitrary number of parameters and returns the greatest number.
(sum x [y ...])
Adds a list of parameters
Round decimal to nearest integer value.
Returns the greatest integer less or equal than the input x
Returns the least integer greater than or equal the input x
(pow base exponent)
Computes the power of a number base to the exponent
Computes cosine of x
Computes sine of x
Computes tangent of x
(random x y)
Retrieve a random integer between x and y (inclusive)