Profile parameter values in profiles can consist of arithmetical formulas too.
Every parameter value in round brackets ( ) is evaluated as a formula. If the syntax of the formula is incorrect or the result is invalid, an error message is written to dtderr.
If an invalid formula is identified, the calculated value is used instead of the formula.
[see lines in example 3: replaced macros or replaced (default)]
The following standard operators are valid:
+ | - | * | / | ^ | ( | ) |
Many standard functions with one or two arguments are also supported:
sin, con, tan, asin, acos, atan, sinh, cosh, tanh, In, exp, log2, log10, sqrt, rint, ceil, floor,
min, max
Example 1:
em/initial_size_MB = ($(PHYS_MEMSIZE)*0.75)
Sets em/initial_size_MB to 75% of the physical memory specified in profile parameter PHYS_MEMSIZE.
Example 2:
em/initial_size_MB = (min(max(2^8,0.1*$(PHYS_MEMSIZE)),2^12))
Sets value to 10% of the physical memory. The value must be a minimum of 256 MB and a maximum of 4096 MB.