This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Range

Range
generates the list .
Range
generates the list .
Range
uses step di.
  • The arguments to Range need not be integers.
  • Range starts from , and successively adds increments of di until the result is greater than .
  • Range uses the standard Mathematica iteration specification, as applied to a single variable.
In[1]:=
Click for copyable input
Out[1]=
 
In[1]:=
Click for copyable input
Out[1]=
 
In[1]:=
Click for copyable input
Out[1]=
Use a step of 2:
Use a negative step:
Use an exact numeric-valued step:
Use a machine-number step:
Use a precision-24 step:
Range of very large numbers:
Use a symbolic step:
Produce a geometric sequence:
Form a polynomial from coefficients:
Form a random permutation:
Find an inverse permutation:
Range is equivalent to Table:
Use Range or Span (;;) as Part specification:
For some step sizes, Range may not include the upper limit given:
Even though the lower limit was exact, the inexact step makes the first element inexact:
New in 1