Equal Sign for Definition

Keystroke: [:]

x := b

Evaluates b and assigns the result to x. If x is not a valid variable or function name, or suffers from other syntax problems, you see an appropriate error message. If b cannot be evaluated, you see an appropriate error message.

Operands:

Using the Equal Sign for Definition With the Equal Sign for Evaluation

You can use the equal sign for definition with the equal sign for evaluation in a single line. For example,

Defining a variable by an evaluated expression

This defines x by the result on the right-hand side.

x = 1.618

For the purposes of numerical evaluation, this is the same as defining a variable by the expression 1 plus the square root of 5 over 2 itself.

Defining y by the 1 plus square root of 5 over 2

However, you get differing results if you evaluate x and y with the symbolic equal sign (→).

Symbolic evaluation of variables x and y

Defining x by the result of the numerical evaluation is useful if you want x to evaluate symbolically to a floating-point number, rather than a symbolic expression.

Notes:

Tutorial - Defining Variables