Most programming languages support operators similar to the following 6, which are spelled here as in C.

==  !=  <   <=  >   >=

I'm aware of several terms used to include all of these operators. In approximately my perceived best-first order, these are...

EDIT list fixed after Jerry Coffins answer...

  • Relational operators
  • Comparison operators
  • Conditional operators
  • Relative operators

What are the reasons to prefer/avoid each particular term.

  • And don't forget: ==!== Jun 8, 2011 at 23:30
  • @WarrenFaith - Sorry, I don't understand. I feel like I should, but I'm missing something.
    – user8709
    Jun 9, 2011 at 1:21
  • 1
    maybe better with spaces but less impressive in the design: "== != =" (comparison is not assignment) Its basically a little joke between programmers... I should buy a T-Shirt with it... Jun 9, 2011 at 9:55

4 Answers 4


I'd call then "relational operators" (because that's what they are).

"Relative operators" doesn't even seem to make sense (perhaps you really intended "relational operators"?)

"Comparison operators" is all right, but less descriptive.

"Conditional operators" is ambiguous (at best). In C or C++, it's often used for the ternary ?: operator.

  • On "relational" - yes and no. I've seen and used "relative" too, and even if it's an error, that's enough to qualify it for this question.
    – user8709
    Jun 8, 2011 at 23:20
  • I'm accepting this as closest (by a hairs breadth) to my personal bias - I had a strong opinions before asking. The hairs-breadth... In Reins answer, "conditional operators" is not in "normative or common usage". Broadly true, but with enough exceptions that I prefer Jerrys wording. Check Google and you'll see that the exceptions rarely survive in writing, though - most hits will be if-then-else style operators.
    – user8709
    Jun 9, 2011 at 3:24

Some standards call them "relational operators". Some standards call them "comparison operators". I don't find them called "conditional operators" in normative or common usage. Wikipedia calls them "relational operators". On the other hand, Wikipedia also calls this type of operation "comparison".

My totally unscientific statistical analysis indicates that "comparison operators" is more commonly used in general.

I find "comparison operators" makes more sense for the simple reason that most of us probably would speak of "comparing" two values rather than "relating" them, at least in common parlance; and also because "relational" has a different meaning in the context of relational databases.


In the context of C++, I've also occasionally seen a differentiation between relational operators:

<=  >=  <  >

And comparison or equivalence operators:

==  !=

This might have to do with the assumption that relational operators define an ordering relation, while comparison operators merely define the notion of comparative equivalence. Mathematically that's not strictly accurate, so it likely has more to do with the fact that in C++ the former group simply has higher precedence than the latter, introducing a need to differentiate the groups by name.

  • 1
    Expanding on the "not strictly accurate" - any ordering implies equivalence relationships - if (a >= b) and (a <= b) then (a == b). Equivalence can be meaningful when ordering isn't, though.
    – user8709
    Jun 8, 2011 at 23:47

I read "relational operator" as "operator on relations", such as project, cross product, restrict, etc (see Relational algebra).

I favor calling them "comparison operators".

  • A good point, but it points to ambiguity rather than invalidity. IOW I agree-ish, and I +1 the argument with the proviso that there are other arguments in other directions.
    – user8709
    Jun 9, 2011 at 1:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.