A simple meta device that do this :
With : Equal, Bigger, Smaller and not equal function
That should be extremely simple to implement via formula device. I’m busy at the moment though.