Polybench® Reference
Results in 1.0 (Pseudo-True) if the comparison between the inputs is true, or 0.0 (Pseudo-False) otherwise. The comparison function is selected by the user.

Comparator

Overview

The Comparator operator compares the sample value on the upper input (S1), to the sample value of the lower input (S2).
If the result of the comparison is true, the output sample value is set to the value 1. Otherwise the output is set to the value 0.

Operator ports

Input S1: Floating point values

Input S2: Floating point values

Output : Floating point values

Properties

Find more information about changing properties here: link

Method
type: Select from the list
Select the comparison function from the drop-down list.
Select one of those presets:
Smaller
Put out True if S1 is less than S2
Greater
Put out True if S1 greater than S2
SmallerOrEqual
Put out True if S1 less than or equal to S2
GreaterOrEqual
Put out True if S1 greater than or equal to S2
Unequal
Put out True if S1 is unequal to S2
Equal
Put out True if S1 equals S2


Documentation
type: See description
Optional documentation of this object.

It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.

Details

If both inputs have an equal amount of channels, the comparison is done between every channel on the first input, and the corresponding channel on the second input. The result is put out on the corresponding output channel.

If one of the inputs contains only one channel, the values of that channel are compared with all channels of the other input. The output will then contain as many channels as the input with more than one channel.

If the inputs contain an unequal number of channels (except one), the output will always be 0. An error message is then displayed below the symbol.