Effects of the compiler settings on the execution

Mathematical functions that are processing floating-point numbers (REAL, LREAL) might return different results on different target system s – in particular, if the result of the function are located within the threshold of the data type. This different inaccuracies of the mathematical functions is caused by the following factors:

  • the →target system itself,

  • the compiler used for the target system and

  • the configured optimization flags for the compiler.

Do not use blocks/variables with LREAL for Controllino or Arduino Nano

If you create an application for a →Controllino or an →Arduino Nano, avoid the usage of blocks/variables processing/returning LREAL values. The usage of such blocks/variables is possible but the LREAL values are processed with the accuracy of REAL values.

Known examples

Target system

Result of the mathematical function TRUNC_DINT(REAL#3.402823466e+38);

→logi.RTS for Windows

-2147483648

→Raspberry Pi

2147483647