FACTOID # 7: Israel enjoys a GDP per capita 21 times that of the Palestinian West Bank and 33 times that of the Gaza Strip. Its military spending per capita tops the world.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Comparison operator

A comparison operator in computer programming is a binary operator. The application of the operator usually returns a Boolean value indicating whether the comparison holds. Computer programming (often shortened to programming or coding) is the process of writing, testing, and maintaining the source code of computer programs. ... In mathematics, a binary operation, or binary operator, is a calculation involving two input quantities and one kind of a specific operation. ... The adjective Boolean [], coined in honor of George Boole, is used in many contexts: An evaluation that results in either of the truth values true or false. A Boolean value is a truth value, either true or false, often coded 1 and 0, respectively. ...

Contents

Equality operator

An equality operator is one type of comparison operator usually represented as either = (ex. BASIC) or == (ex. C, C++, and Java). The meaning of equality often depends on the programming language and on the values being compared. In addition, an equality operator does not always meet the requirements of an equivalence relation, especially in programming languages which allow operator overloading. BASIC (Beginners All-purpose Symbolic Instruction Code) is a family of high-level programming languages. ... Wikibooks has a book on the topic of C Programming The C programming language (often, just C) is a general-purpose, procedural, imperative computer programming language developed in the early 1970s by Dennis Ritchie for use on the Unix operating system. ... C++ (pronounced see plus plus, IPA: ) is a general-purpose, high-level programming language with low-level facilities. ... Java is an object-oriented applications programming language developed by Sun Microsystems in the early 1990s. ... In mathematics, an equivalence relation, denoted by an infix ~, is a binary relation on a set X that is reflexive, symmetric, and transitive. ... A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. ... In computer programming, operator overloading (less commonly known as operator ad-hoc polymorphism) is a specific case of polymorphism in which some or all of operators like +, = or == have different implementations depending on the types of their arguments. ...


Inequality operators

inequality operators are another type of comparison operator. There are usually five inequality operators <, <=, >, >=, and !=. As with equality operators, the comparison usually, but does not always meet the requirements of a total order (for non-strict inequalities) or a strict weak ordering (for strict inequalities), especially in programming languages which allow operator overloading. In mathematics, a total order, linear order or simple order on a set X is any binary relation on X that is antisymmetric, transitive, and total. ... A strict weak ordering is a binary relation that defines an equivalence relation and has the properties stated below. ... A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. ... In computer programming, operator overloading (less commonly known as operator ad-hoc polymorphism) is a specific case of polymorphism in which some or all of operators like +, = or == have different implementations depending on the types of their arguments. ...


<

The operator < (called "less than") returns true if its first operand evaluates to less than the second operand, and returns false otherwise. In mathematics, an operand is one of the inputs (arguments) of an operator. ...


<=

The operator <= (called "less than or equal to") returns true if its first operand evaluates to less than the second operand or if the operands are equal, it returns false otherwise.


>

The operator > (called "greater than") returns true if its first operand is greater than its second, and returns false otherwise.


>=

The operator >= (called "greater than or equal to") returns true if its first operand is greater than its second or if the two operands are equal, and returns false otherwise.


!=

The operator != (called "not equal") returns true if its operands are not equal and false otherwise. This operand appears in some languages as <>.


Logical equivalence

Though perhaps not obvious at first, like the boolean logical operators XOR, AND, OR, and NOT, the comparison operators have logical equivalence such that they can all be defined in terms of one another.


(x < y) == (y > x) == not(x >= y) == not(y <= x)


(y < x) == (x > y) == not(y >= x) == not(x <= y)


See also


  Results from FactBites:
 
PHP: Comparison Operators - Manual (3050 words)
Comparison operators, as their name implies, allow you to compare two values.
You may also be interested in viewing the type comparison tables, as they show examples of various type related comparisons.
Note: Please note that the ternary operator is a statement, and that it doesn't evaluate to a variable, but to the result of a statement.
Operator comparison (799 words)
Operator comparison =================== Operator comparison is the process of creating desirability preferences for competing operators.
Soar's preference scheme supports relative comparisons, such as that operator O32 is *better than* operator o25, and it supports absolute preferences, such as that operator o25 is {worst} (see Section See preferences on page See preferences for more information on the semantics of preferences).
The only available operators are to move A onto C or the table and to move C onto A. This final production creates worst preferences for operators that move blocks onto other blocks, when that is not their desired position.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.