Next: , Previous: , Up: Operators   [Contents][Index]


6.3.7 Binary Bounding Operators

Binary bounding operators are defined for scalars (both real and complex) and arrays (both real and complex). They restrict their operands to a range of values. The following two operators are available:

Lower Bound

x < y returns the smaller (i.e. closer to -Infinity, for real numbers) of x and y.

Upper Bound

x > y returns the larger (i.e. closer to +Infinity, for real numbers) of x and y.

Comparison of complex numbers is based on their projection on 1+i; see Complex Numbers.

So, to restrict all elements of an array x to between the values of 20 and 33, use x > 20 < 33.