Arithmetic operation

Perform a mathematical operation with two input variables. The basic arithmetic operations of addition, subtraction, multiplication and division are available.

Variables

Name

Type

Description

Input 1

Integer, Double

–

Input 2

Integer, Double

–

Operation

Parameter

Selection of the mathematical operation:

  • + Addition

  • - Subtraction

  • × Multiplication

  • / Division

Result

Integer, Double

–

Hint

The required type of the result variable depends on the types of the two input variables. If both input values are of type Integer, the result must also be of type Integer. In this case, integer operations are used.

In all other cases in which one or both input values are of type double, the result must be of type double. Otherwise, the conversion of a floating point number into an integer could lead to an unintentional loss of information. Mixed forms are also permitted for the input variables, i.e. an integer variable and a double variable can be calculated together.

Warning

When dividing with two integers, integer division is used. Only the quotient without any fractional part is retained and any remainder is discarded.

Example: 7 / 4 = 1, the remainder 3 is discarded.