# How to make a greater equal using math nodes?

For some reasons Blender doens't provide the greater equal operation in the math node even though it is in the soure code, but whatever.

I need a very computationally cheap and compact implementation of the greater equal operation using math node.

Any ideas?

• Look at the dropdown on the Compare node! Jul 2 at 23:32

On the whole, in floating-point world, 'equals' makes sense only for what you know to be representations of integer values with good clearance. In that case, you can subtract a margin from the threshold.

(>= 4 == >3).

With that reservation, you could use 'not less than':

But beware of the concept of 'equals' in floating-point math. Your 3 is probably 2.9999998.

Thanks to @KRyan for a link to a fuller discussion of floating-point comparison, (less flippant than mine) :) .

• While I full-well know what you mean, being a programmer, this answer could probably use at least a little bit of explanation about what the issue is with “floating-point”—a term many non-programmers are unlikely to have heard. (I don’t know Blender and don’t know how much its users are necessarily likely to have been exposed to it.) It’s also worth pointing out that an ε of 1.000 is rather large in most cases and that this is mostly for illustrative purposes. This Stack Overflow answer seems like a decent thing to link to. Jul 3 at 17:08
• Hi @KRyan ! Fair comment. I was thinking of the customary use of 'equals' in procedural shaders.. i.e between integers. I couldn't think of other examples where ε was not used explicitly, as a range. But there must be some. Thanks for the link! I'll cut it in. Jul 3 at 17:18