Recap:
I’ve got few values (as numbers) that are not processed properly by create set (duplicate values persist)
When I round them to the 3rd decimal it works… but why wasn’t it working already?

One is receiving numbers and the other text. Numbers are displayed with less decimals than it really has, so probably you have something like 7.72500001 and 7.72500002 but the panel shows you 7.725.

because you are working with internal methods that do not take any document settings into account. And the problem is even more complex as doubles / floats etc. are not ‘well defined’ when using decimal values.
Rhino internally uses RhinoMath.EpsilonEquals Method (Double, Double, Double) to work around that… And it uses this as epsilon: RhinoMath.Epsilon Field
I guess the sets also use this as their default epsilon…

Thanks for your explanation !
Ok so I get why it’s not linked to rhino’s tolerance… to be honest I added the rhino screenshot so people would not scream at me about rhino tolerance (and I wasn’t so sure too hehe)

But now I’m still developing paranoia over the countless scripts I’ve done before
I feel like panels shouldn’t lie, but i guess it’s more complicated than that

If your number has less than 10 decimals, the result will be the same number. Round operation is something like num - (num % 0.0001) or 0.1 for one decimal or 0.01 for two decimals… and the substraction could be a + depending if you want a floor or ceilling rounding.