Why Does Equality Not Work?

Why doesn’t it work even though some values are matching exactly?

Comparing floating point numbers is tricky. Not sure if its the problem here tho.

I think it’s floating point precision error, you can use Equality within tolerance or Try comparing the panels themselves as strings or via the text match component.

Strings are more literal in their comparisons.

I forget off hand if the equality component accepts text or not, if it does great, if not you can use Text Match.

Alternatively not sure what’s to the left of your relay that 6 is coming from but I would plug both those numbers you want to compare into a number data type object node and then plug those num nodes into the equality component to ensure you arent accidentally comparing text against a number or something different (as the panel is pretty agnostic in how it accepts things but this can lead to comparison issues occasionally.)

Also FYI your dispatch A output needs to be a number or text output it’s not a curve. If you want it to return the curves with length = to 6 then ensure that the L input of dispatch is hooked up to your S output on the Explode Curve component

1 Like

Whatever you do, never fully rely on panel results. There will be text formatting going on that hides issues with precision.

There are many threads on this forum about floating point arithmetic and how to deal with that.

1 Like

Hi,

Short answer: they aren’t. The panels show a truncated display of the actual value. To see more decimal places, plug the values into a format expression like this:

Rather than using equality, look for values that are within a small delta of each other:

HTH
Jeremy

2 Likes