Floating-Point Numbers in the Automation Engine

Here you find a short description of the representation of floating-point numbers in information technology and specifics relevant to the Automation Engine. An in-depth discussion of computer and numeric floating-point numbers you may find in the respective scientific literature and on the web.

 

Computing floating-point numbers in information technology leads to rounding errors, as the number of digits that can be used is finite. Since computers use the binary system for their calculations and internal representation of numbers, numbers in computer systems have to be transformed into the binary system first.

A very well-known example for issues with the representation of numbers in computer systems is the decimal floating-point number 0.1, which needs an infinite number of digits in the binary system.

The representation of floating-point numbers in the binary system has been defined by the IEEE with the standard IEEE754 for simple and double precision. The datatype double precision is being used inside the Automation Engine.

Concerning the example of the number 0.1: By saving it with double precision it becomes 0.100000000000000005551115123126 mathematically. Would this number be used for calculations, subsequent faults would occur.

The output of this number is again rounded, so that the Automation Engine displays 0.10000000000000001.