cables is under heavy development.
There might be one or another bug, please let us know about it!

MathExpression Op

Namespace: Ops.Math

Op author: simod

calculates a user defined mathematical expression

With this op, you can write your own mathematical expression to be calculated. You can use up to 4 numbers (a, b, c, d) in this equation. Just type in the lower-case letter of the port you want to use in the equation input.

Here are a few example equations to get you started:

log(b + c * 2) / pow(b, 4)

For a reference of mathematical functions availible, please refer to the Javascript Math object:



A (Number)

a input, default value if not connected: 0

B (Number)

b input, default value if not connected: 0

C (Number)

c input, default value if not connected: 0

D (Number)

d input, default value if not connected: 0


Expression (String)

mathematical expression to be calculated: the variables a, b, c, d can be used here


Result (Number)

result of the equation

Expression Valid (boolean Number)

returns true if the expression is valid, false otherwise

Caught a mistake or want to contribute to the documentation?

Edit Documentation 

Math expression example


created op
2020-07-23 - simod
Ops.User.simod.MathExpression renamed to Ops.Math.MathExpression
2020-07-23 - simod

Patches using MathExpression

  • Examples
  • My Patches
  • Public