RandomReal

RandomReal[] generates a random floating point from 0 to 1.

RandomReal[max] generates a random floating point from 0 to max.

RandomReal[min, max] generates a random floating point from min to `max.

Attributes[RandomReal] := {Protected}

Details

SeedRandom[UnixTime[]] is called automatically upon initialization of Expreduce, so random number sequences will not repeat over subsequent sessions.

Simple examples

In[1]:= RandomReal[]
Out[1]= 0.0750914

Further examples

Use SeedRandom to seed the RNG:

In[1]:= SeedRandom[3]
Out[1]= Null
In[2]:= RandomReal[]
Out[2]= 0.719983
In[3]:= RandomReal[]
Out[3]= 0.652631
In[4]:= SeedRandom[3]
Out[4]= Null
In[5]:= RandomReal[]
Out[5]= 0.719983