Skip to main content

Evaluate Node

Evaluate Node Screenshot

Overview

The Evaluate Node performs a mathematical operation on the input values and outputs the result. It supports a variety of operations including addition, subtraction, multiplication, division, exponentiation, modulus, absolute value, and negation.

Inputs

TitleData TypeDescriptionDefault ValueNotes
AnumberThe first operand for the operation.(Required)The input will be coerced into a number if it is not a number.
BnumberThe second operand for the operation.(Required for binary operators)The input will be coerced into a number if it is not a number.

Example 1: Performing a simple addition

  1. Create an Evaluate Node and set the Operation to +.
  2. Create two Number nodes, set their values to 2 and 3 respectively.
  3. Connect the Number nodes to the A and B inputs of the Evaluate Node.
  4. Run the graph. The output of the Evaluate Node should be 5.

Evaluate Node Example 1

Error Handling

If the operation fails (for example, if you try to divide by zero), the Evaluate node will error.

FAQ

Q: What if I want to perform a different operation based on the input?

A: You can use the Operation input port to dynamically change the operation based on the input. The input will be coerced into a string and must match one of the supported operations.

See Also