Puzzle Potato Dry Brush.png
UnNews Logo Potato1.png

Welcome to the Mother Ship of amateur comedy writing! (Amateur means we don't pay you to do it.)

This is where the original Uncyclopedia wound up. You might as well pick a user name. We have no "partners" that want to sell you stuff. Giving your email simply lets you recover your password; we don't send spam. Uncyclopedians get a talk page, private edit area, and a welcome, maybe, if you actually edit; and we won't de-platform you for your views, if they're funny.


Template:Randnum/doc

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search
This is a documentation subpage for Template:Randnum.
It contains usage information, categories and other content that is not part of the original template page.
To view the template page itself, see Template:Randnum.

Usage

0-1

Produces a real number between 0 and 1

{{Randnum}}

or

{{Randnum|c}}

where c is an integer greater or equal to zero and less than 46684427. If this template is used several times with the same integer, then it will produce the same number.

Range

Produces a integer number in a range

{{Randnum||min|max}}

or

{{Randnum|c|min|max}}

where min is the lower bound and max is the upper bound

Examples

  • {{Randnum}}
    • 0.52475773091982
  • {{Randnum|1}}
    • 0.71315066832252
  • {{Randnum|1}}
    • 0.71315066832252
  • {{Randnum|2}}
    • 0.90154360572522
  • {{Randnum||10|20}}
    • 15
  • {{Randnum|1|10|20}}
    • 17

Notes

  • In order to avoid syntax errors, put in the c value!
  • This template is able to defeat the page cache using the random selection feature (the choose tags).
  • The source of randomness is based on the number of articles, pages, files, registered users and admins, and the time (to the second).
  • This is suitable for use in parser functions
    • eg: 5 + 7 = 12

Math

http://en.wikipedia.org/wiki/Linear_congruential_generator

seed: 20250404135117 mod 1000000+107989-37322+377438-130422+18

=452818