In Range and Coerce

Determines whether x falls within a range specified by the upper limit and lower limit inputs and optionally coerces the value to fall within the range. The function only returns coerced(x) in Compare Elements mode. Details

upper limit, x, and lower limit must be of the same data structure, either arrays or clusters, but they can have different numeric representations. For example, if you change one of the data types to an array, you must change the remaining data types to arrays to avoid broken wires.
coerced returns the value(s). If x is within the range set by the upper limit and lower limit inputs, the value in x is unchanged. If the number is not in range, it is converted to either the upper limit or lower limit.
In Range? is a Boolean scalar value in Compare Aggregates mode. In Compare Elements mode, the data structure of In Range? matches the structure of x, with each scalar replaced by a Boolean.

In Range and Coerce Details

If the function is in Compare Aggregates mode, it does not return the coerced value in coerced(x), but merely passes x through unmodified. If x is greater than upper limit, the function coerces x to the upper limit value. If x is less than lower limit, the function coerces x to the lower limit value. The connector pane displays the default data types for this polymorphic function.

In the case of numeric values, the upper limit, lower limit, and x inputs do not have to be the same data type representation.

By default, lower limit is a valid coercion value, while upper limit is not. Right-click the function and select Include upper limit to include upper limit in the range. These options only affect the result of In Range?. If x is coerced, it might be coerced to the upper or lower limit regardless of whether Include upper limit or Include lower limit was selected.

This function compares each data type according to the Boolean comparison rules.