I am not sure about the gap being the key variable. Rounding is raising its ugly head in all my tests. Several of Jens' examples can give multiple answers that differ in the 3rd or 4th decimal. For example, I have derived 2 very different answers for CD1 that give lengths of 44.9998 & 44.9999 for an improvement of 0.0001 in the gap. Small changes in logic can drastically change the derived results.

Rounding & data conversion in kixtart can be bizarre & unpredictable.
_________________________
Jack