Numerical comparisons

Top  Previous  Next

Conditionals can be formed employing logical conditions which compare two numerical expressions to see if they are equal, unequal, or if one or the other is larger.  The general form is

 

Term$(terma operator termb)

 

The operators are as follows:

RelationGAMS operator                Explanation
EqualityEq or =                        Does terma = termb
Not EqualNe or <>                        Does terma ≠ termb
Greater thanGT or >                        Is terma > termb
Greater or =GE or >=                        Is terma > termb
Less thanLT or <                        Is terma < termb
Less or =LE or >=                        Is terma < termb

 

Each is discussed below.