I just sent in a bug with setsearch, where
> setsearch([1.1,1.3],1.2,1)
and
> setsearch([1.1,2],1.2,1)
give different results despite the element being in the same position in both cases. (Wrapping the vectors with Set() gives the same results.)
I discovered this while writing some code looking for the number of elements in a set in an interval. For that purpose it would be convenient to have a third flag which acts like flag 0 when the element is found and like flag 1 when the element is missing: