I assume you have to flatten the tree into a list somewhere after the subtraction component.

Iâ€™m trying to filter some numbers to avoid a division by zero, I tried another way with the â€śEqualsâ€ť component, but it has the same problem. I thought Rounding the numbers could help, but the truth looks to be elsewhereâ€¦

Unfortunately I have to preserve the data tree structure

Oh . Unfortunately I do not understand data trees that much.

Perhaps try using scripting components and remove all values that equal 0 (zero).

can you post an example file with the numbers/data you are using?

I think it is a rounding issue. The equal is the same case as your first example where you may be checking 0 vs 0.00001

both @HS_Kim and @Adam_M are correct. It is a rounding issue. Just add the formula that @Adam_M provided above into your expression component. (after the abs component in your def)

`if(Round(x,2)=0,1,0)`

Thanks for the tip, yes it is a mystery!

It is no mystery https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html

It is pretty common knowledge in computational design, engineering, architecture, etc. you should consider everything as tolerance based, not absolute. Even Rhino itself is tolerance based (See Options>Units in Rhino to see your tolerances). Long story short, unless you are using integers, never ask if **A=B**, always ask if **abs(A-B)<tolerance**