Testing similarity between two sets of decimal numbers (x and y coordinate of pt1 and pt2 located on this link). I do not get the expected count of boolean values (15,682). Could it be a decimal to binary conversion issue? Changing the threshold does not always help, especially with many more numbers. Any help would be greatly appreciated!
x is a sorted list of doubles
for i = 1 to x.count-1
if Math.Abs(x(i)-x(i-1))<myThreshold then...
As much as I like complicated answers, there's a nice cull duplicates
feature in Grasshopper. I tested it on 1144 of your values and it returned 865 of them that were unique.
As these are points it's the fastest way to remove the duplicates. On my system it's 46ms vs 1.1s to do the same thing with python.
As you increase the tolerance from 0 to 0.2 the number of unique points drops, but quite abruptly:
So it seems that you only have identical points. This might be something to do with the way that you've exported the data that you have in dropbox, but as all your numbers are to 6dp I think that you are safe to use this method ans take advantage of all the optimisations that David has built in.