Bug in a similarity component (?)

Similarity doesn’t recognise the 0 value even with percentage increased to 10.

Equality gives all 4 False results too, but this is, kind of, expected given the previous explanation about how the numbers in GH works.

Try adding a number node in between your text panels and the similar node inputs. Sometimes number values passed as text panels result in odd rounding values that numerical comparison operations don’t respect as intended.

It is not helping. I am still receiving this:

This seems to be working in all case:

Tolerance (x %) of 0 is 0 !
it will work with a tolerance equal to 100 %

Very little values if not equal are very dissimilar !

you better use Abs(x-y) < tolerance

1 Like

100% is not a solution as it will accept everything as a true value:

I like your solution with defined tolerance which is similar to my rounding.

I just encountered the same issue. I found that - for whatever reason - the component works when you input the values into a panel befor feeding it into the similarity component.

The reason is that the text panel values are rounded off to six decimal places.