Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Encyclopedia:FAQ/Technical
(section)
Project page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Is the "random article" feature really random? {{anchor|random}} == : No, although it's random enough to provide a small sample of articles reliably. : In the Wikipedia [[database]], each page is assigned a "random index", which is a random floating point number uniformly distributed between 0 (inclusive) and 1 (exclusive). The "random article" feature (Special:Random) chooses a random [[double-precision|double-precision floating-point number]], and returns the next article whose random index is greater than the selected random number. Some articles will have a larger gap before them, in the random index space, and so will be more likely to be selected. So the actual probability of any given article being selected is in fact itself random. : The random index value for new articles, and the random value used by Special:Random, is selected by reading two 31-bit words from a [[Mersenne twister]], which is seeded at each request by PHP's initialisation code using a high-resolution timer and the PID. The words are combined using: ::(mt_rand() * $max + mt_rand()) / $max / $max :Some old articles had their page_random value reset using MySQL's RAND(): :: rand_st->seed1=(rand_st->seed1*3+rand_st->seed2) % rand_st->max_value; :: rand_st->seed2=(rand_st->seed1+rand_st->seed2+33) % rand_st->max_value; :: return (((double) rand_st->seed1)/rand_st->max_value_dbl); :Due to [[phab:T208909|a bug]], many pages created in 2004 and 2005 used to have non-random page_random values; this was corrected in 2018.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Encyclopedia:FAQ/Technical
(section)
Add topic