PowerRange

PowerRange[a,b]
generates a list , with successive elements increasing by factors of 10.

PowerRange[a,b,r]
uses factors of r instead of 10.

DetailsDetails

  • PowerRange effectively behaves like Range, but in "log-space".
  • The arguments a and b to PowerRange need not be integers or powers of r, but must be either both positive or both negative.
  • PowerRange starts from a and successively multiplies by r until the result is larger than b.
  • If is not a power of r, the end point b will not be included in the list generated by PowerRange.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Generate a list of powers of 10 from 1 to 1 million:

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

Generate a list of powers of 2 less than a hundred:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2014
(10.0)