Arithmetic operation

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

Variables

Input/Output

Name

Type

Description

Input

Input 1

Integer, Double

Operand 1

Input

Input 2

Integer, Double

Operand 2

Input

Operation

Parameter

Arithmetic operation:

  • + Addition

  • - Subtraktion

  • × Multiplication

  • / Division

Output

Result

Integer, Double

Result

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.