Consider this simple problem where one has two bodies of masses mA, mB, their relative position BA, and the position CC of their center of mass:
mA = 398600.435436; mB = 4902.800066; CC = 0.12051741410138465477 BA = -0.00080817735147818490
One wants to know the positions, xB and xA, of the two bodies, which are given by
xA = (mA CC + mB CC - mB BA)/(mA + mB) xB = (mB CC + mA (CC + BA))/(mA + mB)
If I evaluate xA and xB numerically in Mathematica 10.3.1.0, and then compute the relative distance between the two bodies, I should get BA. However, there is a small numerical difference:
In:= xB - xA - BA Out= -2.168404344971009*10^-18
Do you know how to increase the numerical precision in order to decrease the difference above?