Advanced

Change History

Discuss your script development with others (bugs, optimizations, methods ...)

Message: Re: My trail / Cache chain

Changed By: arisoft
Change Date: January 13, 2018 11:35AM

Re: My trail / Cache chain
It is now fixed. The bug was there from the beginning. When two calculated total distances were exactly the same, then the sort order gone wrong way. simple ">=" to ">" corrected it. I have tested this part many times with asserts, because it is know n to be [url=https://en.wikipedia.org/wiki/Binary_search_algorithm#Implementation_issues]the most difficult programming task in the universe[/url], but apparently never got two same distances at the same time before this.

Original Message

Author: arisoft
Date: January 13, 2018 11:34AM

Re: My trail / Cache chain
It is now fixed. The bug was there from the beginning. When two calculated total distances were exactly the same, then the sort order gone wrong way. simple ">=" to ">" corrected it. I have tested this part many times with asserts, because it is know to be [url=https://en.wikipedia.org/wiki/Binary_search_algorithm#Implementation_issues]the most difficult programming task in the universe[/url], but apparently never got two same distances at the same time before this.