Custom Expression Editor

There are many sections in Rational Will where you can use Custom expressions. For example, the Probability Distribution modeling tool supports custom piecewise expressions for custom Density function. Utility Function editor supports custom expression for defining your very custom utility function. The custom expression editor looks like this:

custom_expression_editor

The expression you see in the above screenshot, means,

piecewise_function

Explanation:

When x >= 125, f(x) = e^(-0.5 * ((x - 150) / 25)^2) / (sqrt(2 * pi) * 25) .

Otherwise, f(x) = 0.

Quick Tip

You can see the supported functions anytime by clicking the info button as shown below:

custom_expression_help

List of supported functions


  • exp(x), you can also use e^x.
  • log10(x)
  • sin(x)
  • cos(x)
  • tan(x)
  • sqrt(x)
  • abs(x)
  • pow(x,5) where x is the base and 5 is just a number for example, that raises on x as an exponent. You can also use an expression like x^5 which is also recognized.
  • round(x)
  • ln(x)
  • factorial(x)
  • gamma(x)
  • beta(x)
  • binomial(x,2)
  • erf(x)
  • arcsin(x)
  • arccos(x)
  • arctan(x)


Supported Constants

  • pi
  • e

Supported Operators

  • +
  • -
  • *
  • /
  • ^
  • (
  • )

Boolean Expressions

In the condition section, you can use the same functions that you can use in the expression section. Also, a various boolean combination can be used. For example:

  • (x > 5) AND (x < 10) which is equivalent to (x > 5) && (x < 10). You can use either of these styles, your choice.
  • (x >= 2) OR (x ==7), which is equivalent to (x >= 2) || (x == 7). You can use either of these styles.

Last updated on Sep 29, 2018