I am using Microsoft Visual Studio Version 16.11.7, and have trouble understanding where this difference of values comes from, since the equations are mathematically the same. The values of a_res and Z are calculated through a complicated routine and are defined as doubles:
double test;
test = a_res - 1.0 + Z - (a_res - 1.0 + Z); // test is exactly 0.0
test = a_res - 1.0 + Z - a_res + 1.0 - Z; // test has the value of -1.1102230246251565e-16
It is important for my calculations do solve this Problem.
I am thanksful for any help