Formulas MD3
Formulas enable you to reuse a numerical computation in different locations. Instead of writing the same expression for each cell that uses it, you can use a named formula. Complex computations can be stored under a unique name in order to make them reusable throughout the knowledge model.
An alternative way of calculating is using an expression with keyword EVAL. Suppose that we must determine a percentage of a part amount compared to a total amount. We can model like: EVAL((Part / Total) * 100). But at another place where we need a percentage we must edit this again. With a formula named 'Percentage' we define it once and use it at many places.
A formula consists of:
- a name, not containing spaces
- one or more arguments
- a body
- comments, to add free (explaining) text
And it has a result being a single numerical value.
The arguments are simple alphabetical characters or words. They are "formal" arguments. At places where we apply the formula these formal arguments are substituted by "actual" arguments. An actual argument is one of:
- a literal number
- reference to a Number variable: VALUE(numbervar)
The body is an arithmetic expression, the calculation. It consists of operands, operators and possibly functions. An operand is a literal number or an argument.
An operator is an arithmetic sign: + - * / mod ^ ( ) =
Functions are about goniometry, logarithms, rounding and more.