Expressions

Expressions#

Supported Elements#

Note

Operators and functions may support lazy calculation, see Lazy Calculations

Supported expressions can include:

  • Unary operators +, -, not (also NOT) with any custom operators added.

  • Binary +, -, *, /, <, >, <=, >=, = (also ==), <> (also !=), and (also AND), or (also OR) with any custom operators added.

    • All unary and binary operators except for + and - can be disabled.

    • and/AND, or/OR operators are lazy, see Lazy Calculations.

  • Numbers, obviously. All numbers are cast to float internally.

  • Functions. Function names are case insensitive alphanumeric strings that do not start with a number. They may have an optional @ prefix. Functions with and without prefix are equivalent. Functions accept a single parameter. Custom functions can be created with a Config object. See Functions for a full list.

  • Variables. Variable names are case insensitive alphanumeric strings that do not start with a number. They may have an optional $ prefix. Variables with and without prefix are equivalent. Also a variable can share its name with a function without collision.

Example#

sin(x) * (coef1 + coef2)