WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

Random[]

gives a uniformly distributed pseudorandom Real in the range 0 to 1.

Random[type,range]

gives a pseudorandom number of the specified type, lying in the specified range. Possible types are: Integer , Real and Complex . The default range is 0 to 1. You can give the range {min,max} explicitly; a range specification of max is equivalent to {0,max}.

Details
Details and Options Details and Options
See Also
Tech Notes
Related Links
History
Cite this Page
As of Version 6.0, Random has been superseded by the functions RandomReal and RandomInteger .

Random[]

gives a uniformly distributed pseudorandom Real in the range 0 to 1.

Random[type,range]

gives a pseudorandom number of the specified type, lying in the specified range. Possible types are: Integer , Real and Complex . The default range is 0 to 1. You can give the range {min,max} explicitly; a range specification of max is equivalent to {0,max}.

Details

  • Random[Integer ] gives 0 or 1 with probability .
  • Random[Complex ] gives a pseudorandom complex number in the rectangle with corners 0 and 1+i.
  • Random[Complex ,{zmin,zmax}] uses the rectangle defined by zmin and zmax.
  • Random[Real ,range,n] generates a pseudorandom real number with ndigit precision. Both leading and trailing digits may be chosen as 0.
  • Random gives a different sequence of pseudorandom numbers whenever you run Wolfram Language. You can start Random with a particular seed using SeedRandom .

History

Introduced in 1988 (1.0)

Wolfram Research (1988), Random, Wolfram Language function, https://reference.wolfram.com/language/ref/Random.html.

Text

Wolfram Research (1988), Random, Wolfram Language function, https://reference.wolfram.com/language/ref/Random.html.

CMS

Wolfram Language. 1988. "Random." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Random.html.

APA

Wolfram Language. (1988). Random. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Random.html

BibTeX

@misc{reference.wolfram_2025_random, author="Wolfram Research", title="{Random}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Random.html}", note=[Accessed: 04-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_random, organization={Wolfram Research}, title={Random}, year={1988}, url={https://reference.wolfram.com/language/ref/Random.html}, note=[Accessed: 04-December-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /