Description
CALCULATEN evaluates a mathematical expression and stores the floating point output of the expression in another variable. If the output of the expression is a Float (a number with decimal places) with more than two decimal places, then output will be rounded off to two decimal places.
How to use this command
CALCULATEN command is for node level operations. It can be used in any node as an instruction, except for the root node. It should not be used on the Arrows.
Let's take an example: CALCULATEN $output_variable "25.251 + 45.12"
Here, "$output_variable" is where the result of the expression "25.251 + 45.12" will be stored.
If you had a tree variable "$x1" which was previously initialized to 45.12, the above expression could have also been "25.251 + $x1"
Examples
- CALCULATEN $bid_submitted "$base_rate + $pricing_augmentation"
- CALCULATEN $lane_premium "$base_rate * 0.05"
- CALCULATEN $variable2 "($x1 + 45.215) * 45.214/12.14"