×

To be able to write in the forum you need to authenticate. Meanwhile it's read-only.

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 10: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 10: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.