how to solve the floating point add up round off in c++
A simple method to add floating-point numbers is to first represent them with the same exponent. In the example below, the second number is shifted right by three digits, and we then proceed with the usual addition method: In detail: This is the true result, the exact sum of the operands. Logarithmic number systems represent a real number by the logarithm of its absolute value and a sign bit. 2  The value distribution is similar to floating point, but the value-to-representation curve (i.e. , the graph of the logarithm function) is smooth (except at 0).