Comparison Operators

Comparison operators, as their name implies, allow you to compare two values.

ChaosPro trans Comparison Operator
 Example   Name   Result 
ChaosPro trans Comparison Operator
 a == b    Equal    True if a is equal to b (i.e. has the same value). 
ChaosPro trans Comparison Operator
 a != b    Not equal    True if a is not equal to b (i.e. does not have the same value). 
ChaosPro trans Comparison Operator
 a < b    Less than    True if a is strictly less than b. 
ChaosPro trans Comparison Operator
 a <= b    Less than or equal to    True if a is less than or equal to b. 
ChaosPro trans Comparison Operator
 a > b    Greater than    True if a is strictly greater than b. 
ChaosPro trans Comparison Operator
 a >= b    Greater than or equal to    True if a is greater than or equal to b. 
ChaosPro trans Comparison Operator

When comparing expressions with different datatypes, remember that both expressions will be type-casted so they can be compared. For example if you compare a real and a complex number, then the real number will be type casted to a complex number having an imaginary part of 0. After that they will be compared. Such type casting can slow down calculations.

Comparison Operator