On 15/06/15 01:42, Pawel T. Jochym wrote: > > W dniu 15.06.2015 o 01:28, Tomasz Buchert pisze: > > On 15/06/15 00:46, Tomasz Buchert wrote: > >> [...] > >> Could it be a compiler bug that miscompiled the loop for > >> 0.13.3-2? > > > > I take it back, now I think it is not compiler issue (see below). I > > extracted the parameters that make the loop infinite and made a > > minimal program that shows the problem (attached). > > > > As you can see, it converges quite rapidly, but finally |E-Ep| stays > > bigger than 1e-10 and E oscilates between 2 values. An engineer's way > > to solve it would be to let the loop run for, say, 100 iterations, > > and if it didn't converge, just show a warning. > > > > Cheers, > > Tomasz > > Notice how close to parabolic this orbit is. Maybe we need a better > algorithm for this range of params. Also numerical conditioning may > be important in such a case. > > P.
Right, there are also divisions by (1 - e) which indeed make it badly-defined for parabolic orbits. I agree that the algorithm should be improved to handle this case better. Oh, I've just found this: https://bugs.launchpad.net/stellarium/+bug/1030913 History repeats itself! Tomasz
signature.asc
Description: Digital signature