SAP Note 2798 - Floating point arithmetic

Component : Syntax, Compiler, Runtime -

Solution : https://service.sap.com/sap/support/notes/2798 (SAP Service marketplace login required)

Summary :
The ABAP data type F (DDIC data type FLTP) is derived from binary floating point arithmetic, which can introduce rounding errors. When converting a decimal number to this binary format, rounding occurs, causing potential discrepancies. For instance, the division of 2.55 by 0.1 might yield 25.500...0 instead of the expected 25.499...96, leading to an unexpected rounded integer of 25 rather than 26. Another example shows 7.27% of 73,050 becoming 5310.735; due to binary limitations, it's represented as 5.3107349999...97E+03, rounding off to 5310.73 instead of 5310.74. Use type P or decfloat for precision.

Key words :
floating pointthe abap data type, terms floating point reason, ddic data type fltp, binary floating point arithmetic, representable floating point number, largest floating point number [, decimal floating point arithmetic, floating point numbers, decfloat data types, rounding errors occur

Related Notes :

328894
207351Purch order:Invalid roundng accordng to roundng val
195544
185005
2541