GreaterEqual
GreaterEqual
a >= b represents the mathematical 'greater than or equal to' relation. Use a >== b to check it in a script.
Usages
a >= b or GreaterEqual[ a, b ]
a >= b represents the inequality a ≥ b, for example in a definition or an answer. In a script, it is not checked: 4 >= 4 stays 4 >= 4. It is checked when it is used as a condition in If or While, or inside Simplify.
| Example | in | rendered |
|---|---|---|
The inequality x ≥ 4. |
x >= 4 or GreaterEqual[ x, 4 ] |
| Example | in | out |
|---|---|---|
| Not checked in a script. | 4 >= 4 |
4 >= 4 |
Checked inside Simplify. |
Simplify[ 4 >= 5 ] |
False |
| Checked as a condition. | a := 4 |
r = 1 |
a >== b or GreaterEqualEval[ a, b ]
a >== b checks directly whether the value of a is greater than or equal to the value of b, and returns True or False. If one of the values is not known, the comparison is left unevaluated.
| Example | in | out |
|---|---|---|
4 is equal to 4. |
4 >== 4 |
True |
3 is smaller than 4. |
3 >== 4 |
False |
| Each element of a list is compared. | {1, 5} >== 4 |
{False, True} |
| Cannot be decided. | x >== 4 |
x >== 4 |
Details
- Note the notation:
>==with two=signs.>>=is not valid syntax.
See also: Greater, SmallerEqual, EqualsEval, If