Between

Between[x,{min,max}]

is equivalent to minxmax.

Between[x,{{min1,max1},{min2,max2},}]

is equivalent to min1xmax1||min2xmax2||.

Between[range]

is an operator form that yields Between[x,range] when applied to an expression x.

Details

Examples

open allclose all

Basic Examples  (3)

Check that a number is included in an interval:

In[1]:=
Click for copyable input
Out[1]=

Use an operator form:

In[2]:=
Click for copyable input
Out[2]=

For symbolic expressions, the result is given as inequalities:

In[1]:=
Click for copyable input
Out[1]=

Select the numbers between 10 and 20, both included:

In[1]:=
Click for copyable input
Out[1]=

Scope  (6)

Applications  (3)

Properties & Relations  (3)

See Also

IntervalMemberQ  LessEqual  GreaterEqual  LessEqualThan  GreaterEqualThan  MinMax  DateWithinQ

Introduced in 2015
(10.3)