Not really your problem, but something that might be of interest ...
Long time ago when I were a lad, some of the guys in the Physics lab at the university where I used to work did a lot of very long physical simulations. I seem to recall that they kept track of the total energy in their system. Due to small floating point errors, it was common for the energy to gradually drift, so they applied a fudge whereby any excess energy was redistributed evenly (or any deficit was rectified). This only needed to be done infrequently.
Long time ago when I were a lad, some of the guys in the Physics lab at the university where I used to work did a lot of very long physical simulations. I seem to recall that they kept track of the total energy in their system. Due to small floating point errors, it was common for the energy to gradually drift, so they applied a fudge whereby any excess energy was redistributed evenly (or any deficit was rectified). This only needed to be done infrequently.