ericagol / NbodyGradient.jl

N-body integrator computes derivatives with respect to initial conditions for TTVs, RV, Photodynamics & more
MIT License
20 stars 9 forks source link

Try out compensated summation #22

Closed ericagol closed 3 years ago

ericagol commented 5 years ago

The integral of x & v with respect to time amount to carrying out a large sum of the slight changes in these quantities with time.

It may be worth investigating if compensated summation can give better precision without much arithmetic overhead. This may be worth doing in a separate branch.

Also, it may be worth doing compensated summation in the correction steps, phic and phisalpha. We also need to investigate how this would affect the Jacobians, and whether there is a way to apply compensated summation.

ericagol commented 5 years ago

I opened a new branch, compensated_summation, which carries this out any time x or v is modified. This didn't seem to improve the precision of the algorithm for small values of h (although perhaps the comparison needs to be made with the BigFloat computation, not with smaller values of h).

langfzac commented 3 years ago

This has been implemented.