up previous next
Order Comparison Operators    --    less than, greater than, ...


Syntax
A < B       less than
A > B       greater than
A <= B      less than or equal
A >= B      greater than or equal
  return BOOL

Description
These ordering operators perform the corresponding comparison between A and B . They will signal an error if A and B are not comparable (e.g. of different types, or if the type does not have a natural ordering). Polynomials which are just power-products are ordered using the power-product ordering.

Example
/**/ 1 > 1/2;
true
/**/  "abc" < "def"; -- lex ordering for strings
true
/**/  use QQ[x,y];
/**/  x < y;   -- x and y are viewed as power-products
false

See Also