# Evaluate Formula (Parsed Formula) (G Dataflow)

Calculates function values by interpreting a parsed formula.

## parsed formula

Parsed version of the formula that this node uses to calculate function values.

You can wire this input from the corresponding output of the Parse Formula String node.

### code

Components of the formula.

#### type

Type of the parsed token.

Name Value Description
( 0 The token is a left parenthesis.
) 1 The token is a right parenthesis.
number 2 The token is a number.
operator 3 The token is an operator.
function 4 The token is a function.
variable 5 The token is a variable.

#### operator or function

Operator or function corresponding to the parsed token.

Name Value Description
NaN 0 Not a number
- 2 Subtraction
* 3 Multiplication
/ 4 Division
^ 5 Exponentiation
assign 6 Assigns values to variables.
neg 7 Returns the negative values of the specified x values.
abs 8 Returns the absolute values of the specified x values.
acos 9 Computes the inverse cosine of the specified x values in radians.
acosh 10 Computes the inverse hyperbolic cosine of the specified x values.
asin 11 Computes the inverse sine of the specified x values in radians.
asinh 12 Computes the inverse hyperbolic sine of the specified x values.
atan 13 Computes the inverse tangent of the specified x values in radians.
atanh 14 Computes the inverse hyperbolic tangent of the specified x values.
ceil 15 Rounds the specified x values to the smallest integer that is greater than or equal to x.
cos 16 Computes the cosine of the specified x values.
cosh 17 Computes the inverse hyperbolic cosine of the specified x values in radians.
cot 18 Computes the cotangent of the specified x values in radians.
csc 19 Computes the cosecant of the specified x values in radians.
exp 20 Computes the values of e raised to the power of the specified x values.
expm1 21 Computes one less than the value of e raised to the power of the specified x values using the following formula: (e^x) - 1.
floor 22 Truncates the specified x values to the nearest integer that is less than x.
getexp 23 Returns the exponent of x.
getman 24 Returns the mantissa of the specified x values.
int 25 Rounds the specified x values to the nearest integers.
intrz 26 Rounds the specified x values to the nearest integers between x and zero.
In 27 Computes the natural logarithm of the specified x values to the base of e.
Inp1 28 Computes the natural logarithm of (x + 1), where x is the specified x values.
log 29 Computes the logarithm of the specified x values to the base of 10.
log2 30 Computes the logarithm of the specified x values to the base of 2.
rand 31 Generates uniformly distributed pseudorandom numbers in the interval [0, 1] using the specified x values as the seeds that initialize the pseudorandom number generator.
sec 32 Computes the secant of the specified x values in radians.
sign 33 Returns 1 if the specified x values are greater than 0, returns 0 if the specified x values are equal to 0, and returns -1 if the specified x values are less than 0.
sin 34 Computes the sine of the specified x values in radians.
sinc 35 Computes the sine of the specified x values divided by x (sin(x)/x) in radians.
sinh 36 Computes the hyperbolic since of the specified x values.
sqrt 37 Computes the square root of the specified x values.
tan 38 Computes the tangent of the specified x values in radians.
tanh 39 Computes the hyperbolic tangent of the specified x values.
gamma 40 Evaluates the gamma function or incomplete gamma function for the specified x values.
pi 41 Computes the constant π multiplied by the value of the specified x values. Set x to 1 to use the constant π in a formula.
ci 42 Evaluates the cosine integral for any real nonnegative number in the specified x values.
si 43 Evaluates the sine integral for an real number in the specified x values.
spike 44 Generates the spike function for any real number in the specified x values.
step 45 Returns 1 if the specified x values are equal to or greater than 0, and returns 0 if the specified x values are less than 0.
square 46 Computes the square wave value of the specified x values.

#### operand 1

First operand of the operator or function.

#### operand 2

Second operand of the operator or function.

### constants

Constants in the parsed formula.

### variables

Strings representing the variables in the parsed formula.

## x values

x values corresponding to variables.

## variables

n independent variables of the given formula. variables has a one-to-one relation with x values.

## error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

## y value

Calculated function value.

## error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices

Web Server: Not supported in VIs that run in a web application