Larger component - incorrect behaviour

Hello

I’ve stumbled upon a strange problem while working on a pretty complex deffinition.
What it boils down to is that I have to compare two distances between two points and a reference point and I want to select the one that is at a distance greater than zero. Then I get this:


I then tried to replicate the issue and I have internalized the data and simply copied the relevant components into a new document. This gives me the correct result:

Any easy workaround?

problem.gh (7.4 KB)
This is the working *.gh file with the inputs internalized. I didn’t upload the original one because it is needlesly complicated for this, but I will add it if it is useful.

Looks like a tolerance or floating-point problem. Never compare to zero, but to a number close to zero like 0.0001, in practice it is the same and so you consider a distance of 0.000000000000000001 as 0, but is not really zero for the machine. The GH panel does not give you the number as it is, it hides these unnecesary decimals from you.

1 Like

Thank you! Changing from zero to 0.000000001 works!
Now that you mentioned it I did use a document tolerance much lower than the default (0.00001).