Data Type Deduction

Input signals have a defined type as can be seen in the type column of the Variable Explorer. The types of intermediate results of a calculation formula are chosen automatically depending on the input types and the applied operations. This process is called type deduction.

Internally, a calculation operation is represented by multiple implementations each with specific types for the inputs and outputs of the operation: the type combinations. Type deduction works by choosing a type combination that matches the inputs. Inputs may be converted to similar larger types if no exact match can be found:

  • Signed integer to larger signed integer
  • Unsigned integer to larger unsigned integer
  • Any integer to 64 bit float
  • Boolean to any numeric

Examples:

  • Bit operations exist for signed and unsigned integers of all sizes. Type deduction chooses the smallest size that is greater or equal than all inputs.
  • Arithmetic operations (plus, times, …) only exist in double so type deduction will always convert inputs to double.