CINXE.COM
Random number generation - Wikipedia, ang malayang ensiklopedya
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="tl" dir="ltr"> <head> <meta charset="UTF-8"> <title>Random number generation - Wikipedia, ang malayang ensiklopedya</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )tlwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy" ,"wgMonthNames":["","Enero","Pebrero","Marso","Abril","Mayo","Hunyo","Hulyo","Agosto","Setyembre","Oktubre","Nobyembre","Disyembre"],"wgRequestId":"54f2229a-b8b6-4916-9a4c-fdab0ee836a9","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Random_number_generation","wgTitle":"Random number generation","wgCurRevisionId":2031748,"wgRevisionId":2031748,"wgArticleId":161067,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with invalid date parameter in template","Lahat ng mga artikulong na may kakauting wikilinks","Lahat ng mga artikulong ulila","Mga artikulo na kakaunting wikilinks - Disyembre 2013","Pagkaalisaga","Estadistika"],"wgPageViewLanguage":"tl","wgPageContentLanguage":"tl","wgPageContentModel":"wikitext","wgRelevantPageName":"Random_number_generation","wgRelevantArticleId":161067,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true, "wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"tl","pageLanguageDir":"ltr","pageVariantFallbacks":"tl"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":3000,"wgRelatedArticlesCompat":[],"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q228206","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser": false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints", "ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=tl&modules=ext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=tl&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=tl&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Random number generation - Wikipedia, ang malayang ensiklopedya"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//tl.m.wikipedia.org/wiki/Random_number_generation"> <link rel="alternate" type="application/x-wiki" title="Baguhin" href="/w/index.php?title=Random_number_generation&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (tl)"> <link rel="EditURI" type="application/rsd+xml" href="//tl.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://tl.wikipedia.org/wiki/Random_number_generation"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.tl"> <link rel="alternate" type="application/atom+xml" title="Atom feed ng Wikipedia" href="/w/index.php?title=Natatangi:Mga_huling_binago&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Random_number_generation rootpage-Random_number_generation skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Pumunta sa nilalaman</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Sayt"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Pangunahing pagpipilian" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Pangunahing pagpipilian</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Pangunahing pagpipilian</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">ilipat sa gilid</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">itago</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Maglibot </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Unang_Pahina" title="Puntahan ang unang pahina [z]" accesskey="z"><span>Unang pahina</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Tingnan_ang_buod" title="Mga gabay sa pagbabasa ng laktaw-laktaw sa Wikipedia"><span>Mga nilalaman</span></a></li><li id="n-Napiling-nilalaman" class="mw-list-item"><a href="/wiki/Wikipedia:Mga_napiling_artikulo"><span>Napiling nilalaman</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Natatangi:Alin_man" title="Magpalabas ng kahit-anong artikulo [x]" accesskey="x"><span>Alinmang artikulo</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:Patungkol"><span>Patungkol sa Wikipedia</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Wikipedia:Kasalukuyang_pangyayari" title="Hanapin ang mga impormasyon tungkol sa mga kamakailang kaganapan"><span>Mga kaganapan</span></a></li> </ul> </div> </div> <div id="p-Pakikihalubilo" class="vector-menu mw-portlet mw-portlet-Pakikihalubilo" > <div class="vector-menu-heading"> Pakikihalubilo </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Puntahan_ng_pamayanan" title="Tungkol sa proyekto, ano ang maari mong gawin, at kung saan maari maghanap ng mga bagay"><span>Pamayanan</span></a></li><li id="n-Kapihan" class="mw-list-item"><a href="/wiki/Wikipedia:Kapihan"><span>Kapihan</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Natatangi:Mga_huling_binago" title="Tala ng mga huling pagbabago sa wiki. [r]" accesskey="r"><span>Mga huling binago</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="/wiki/Wikipedia:Makipag-ugnayan_sa_amin" title="Paano makokontak ang Wikipedia"><span>Makipag-ugnayan</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/Wikipedia:Tulong" title="Ang lugar para maghanap ng tulong sa Wikipedia."><span>Tulong</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Unang_Pahina" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="Ang Malayang Ensiklopedya" src="/static/images/mobile/copyright/wikipedia-tagline-tl.svg" width="119" height="13" style="width: 7.4375em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Natatangi:Maghanap" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Maghanap sa Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Hanapin</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Maghanap sa Wikipedia" aria-label="Maghanap sa Wikipedia" autocapitalize="sentences" title="Maghanap sa Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Natatangi:Maghanap"> </div> <button class="cdx-button cdx-search-input__end-button">Hanapin</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Mga pansariling kagamitan"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Itsura"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Itsura" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Itsura</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_tl.wikipedia.org&uselang=tl" class=""><span>Donasyon</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Natatangi:Likhain_ang_kuwenta&returnto=Random+number+generation" title="Mas maganda kung gagawa ka ng account at magla-login; gayunpaman, hindi ka pinipilit gawin ito" class=""><span>Gumawa ng account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Natatangi:Paglagda_ng_tagagamit&returnto=Random+number+generation" title="Mas maganda kung magla-login ka; gayunpaman, hindi ka pinipilit gawin ito [o]" accesskey="o" class=""><span>Mag-login</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Marami pang pagpipilian" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Mga pansariling kagamitan" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Mga pansariling kagamitan</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_tl.wikipedia.org&uselang=tl"><span>Donasyon</span></a></li><li id="pt-contribute" class="mw-list-item"><a href="/wiki/Natatangi:Contribute"><span class="vector-icon mw-ui-icon-edit mw-ui-icon-wikimedia-edit"></span> <span>Mag-ambag</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Natatangi:Likhain_ang_kuwenta&returnto=Random+number+generation" title="Mas maganda kung gagawa ka ng account at magla-login; gayunpaman, hindi ka pinipilit gawin ito"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Gumawa ng account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Natatangi:Paglagda_ng_tagagamit&returnto=Random+number+generation" title="Mas maganda kung magla-login ka; gayunpaman, hindi ka pinipilit gawin ito [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Mag-login</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Mga pahina para sa naka-logout na mga patnugot o editor <a href="/wiki/Wikipedia:Maligayang_pagdating!" aria-label="Alamin pa ang tungkol sa pagpapatnugot"><span>alamin pa</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Natatangi:Usapan_ko" title="Usapang tungkol sa mga pagbabagong ginawa sa ip address na ito [n]" accesskey="n"><span>Usapan</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Sayt"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Mga nilalaman" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Mga nilalaman</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">ilipat sa gilid</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">itago</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">Simula</div> </a> </li> <li id="toc-Pseudo-random_Numbers" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Pseudo-random_Numbers"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Pseudo-random Numbers</span> </div> </a> <ul id="toc-Pseudo-random_Numbers-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Pamamaraan_ng_Paglikha_ng_Random_Numbers" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Pamamaraan_ng_Paglikha_ng_Random_Numbers"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Pamamaraan ng Paglikha ng Random Numbers</span> </div> </a> <button aria-controls="toc-Pamamaraan_ng_Paglikha_ng_Random_Numbers-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>Ipakita/Itago ang subseksyon na Pamamaraan ng Paglikha ng Random Numbers</span> </button> <ul id="toc-Pamamaraan_ng_Paglikha_ng_Random_Numbers-sublist" class="vector-toc-list"> <li id="toc-Linear_Congruential_Method" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Linear_Congruential_Method"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span><b>Linear Congruential Method</b></span> </div> </a> <ul id="toc-Linear_Congruential_Method-sublist" class="vector-toc-list"> <li id="toc-Mixed_Congruential_Method" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Mixed_Congruential_Method"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1.1</span> <span>Mixed Congruential Method</span> </div> </a> <ul id="toc-Mixed_Congruential_Method-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Multiplicative_Congruential_Method" class="vector-toc-list-item vector-toc-level-3"> <a class="vector-toc-link" href="#Multiplicative_Congruential_Method"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1.2</span> <span>Multiplicative Congruential Method</span> </div> </a> <ul id="toc-Multiplicative_Congruential_Method-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Midsquare_Method" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Midsquare_Method"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.2</span> <span>Midsquare Method</span> </div> </a> <ul id="toc-Midsquare_Method-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Mga nilalaman" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Itago/Ipakita ang talaan ng mga nilalaman" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Itago/Ipakita ang talaan ng mga nilalaman</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Random number generation</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Pumunta sa isang artikulo na nakasulat sa ibang wika. Mayroon ito sa 22 (na) wika" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-22" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">22 wika</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%AA%D9%88%D9%84%D9%8A%D8%AF_%D8%A7%D9%84%D8%A3%D8%B9%D8%AF%D8%A7%D8%AF_%D8%A7%D9%84%D8%B9%D8%B4%D9%88%D8%A7%D8%A6%D9%8A%D8%A9" title="توليد الأعداد العشوائية – Arabic" lang="ar" hreflang="ar" data-title="توليد الأعداد العشوائية" data-language-autonym="العربية" data-language-local-name="Arabic" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/T%C9%99sad%C3%BCfi_%C9%99d%C9%99d_generatoru" title="Təsadüfi ədəd generatoru – Azerbaijani" lang="az" hreflang="az" data-title="Təsadüfi ədəd generatoru" data-language-autonym="Azərbaycanca" data-language-local-name="Azerbaijani" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-bn mw-list-item"><a href="https://bn.wikipedia.org/wiki/%E0%A6%A6%E0%A7%88%E0%A6%AC_%E0%A6%AA%E0%A6%B0%E0%A7%80%E0%A6%95%E0%A7%8D%E0%A6%B7%E0%A6%BE" title="দৈব পরীক্ষা – Bangla" lang="bn" hreflang="bn" data-title="দৈব পরীক্ষা" data-language-autonym="বাংলা" data-language-local-name="Bangla" class="interlanguage-link-target"><span>বাংলা</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Generaci%C3%B3_de_nombres_aleatoris" title="Generació de nombres aleatoris – Catalan" lang="ca" hreflang="ca" data-title="Generació de nombres aleatoris" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Gener%C3%A1tor_n%C3%A1hodn%C3%BDch_%C4%8D%C3%ADsel" title="Generátor náhodných čísel – Czech" lang="cs" hreflang="cs" data-title="Generátor náhodných čísel" data-language-autonym="Čeština" data-language-local-name="Czech" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikipedia.org/wiki/Random_number_generation" title="Random number generation – English" lang="en" hreflang="en" data-title="Random number generation" data-language-autonym="English" data-language-local-name="English" class="interlanguage-link-target"><span>English</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%AA%D9%88%D9%84%DB%8C%D8%AF_%D8%A7%D8%B9%D8%AF%D8%A7%D8%AF_%D8%AA%D8%B5%D8%A7%D8%AF%D9%81%DB%8C" title="تولید اعداد تصادفی – Persian" lang="fa" hreflang="fa" data-title="تولید اعداد تصادفی" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/G%C3%A9n%C3%A9rateur_de_nombres_al%C3%A9atoires" title="Générateur de nombres aléatoires – French" lang="fr" hreflang="fr" data-title="Générateur de nombres aléatoires" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-hi mw-list-item"><a href="https://hi.wikipedia.org/wiki/%E0%A4%AF%E0%A4%BE%E0%A4%A6%E0%A5%83%E0%A4%9A%E0%A5%8D%E0%A4%9B%E0%A4%BF%E0%A4%95_%E0%A4%B8%E0%A4%82%E0%A4%96%E0%A5%8D%E0%A4%AF%E0%A4%BE_%E0%A4%9C%E0%A4%A8%E0%A4%BF%E0%A4%A4%E0%A5%8D%E0%A4%B0" title="यादृच्छिक संख्या जनित्र – Hindi" lang="hi" hreflang="hi" data-title="यादृच्छिक संख्या जनित्र" data-language-autonym="हिन्दी" data-language-local-name="Hindi" class="interlanguage-link-target"><span>हिन्दी</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Pembangkitan_bilangan_acak" title="Pembangkitan bilangan acak – Indonesian" lang="id" hreflang="id" data-title="Pembangkitan bilangan acak" data-language-autonym="Bahasa Indonesia" data-language-local-name="Indonesian" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Generatore_di_numeri_casuali" title="Generatore di numeri casuali – Italian" lang="it" hreflang="it" data-title="Generatore di numeri casuali" data-language-autonym="Italiano" data-language-local-name="Italian" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E4%B9%B1%E6%95%B0%E7%94%9F%E6%88%90" title="乱数生成 – Japanese" lang="ja" hreflang="ja" data-title="乱数生成" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EB%82%9C%EC%88%98_%EB%B0%9C%EC%83%9D%EA%B8%B0" title="난수 발생기 – Korean" lang="ko" hreflang="ko" data-title="난수 발생기" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%93%D0%B5%D0%BD%D0%B5%D1%80%D0%B0%D1%82%D0%BE%D1%80_%D1%81%D0%BB%D1%83%D1%87%D0%B0%D0%B9%D0%BD%D1%8B%D1%85_%D1%87%D0%B8%D1%81%D0%B5%D0%BB" title="Генератор случайных чисел – Russian" lang="ru" hreflang="ru" data-title="Генератор случайных чисел" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sq mw-list-item"><a href="https://sq.wikipedia.org/wiki/Gjenerimi_i_numrave_t%C3%AB_rast%C3%ABsish%C3%ABm" title="Gjenerimi i numrave të rastësishëm – Albanian" lang="sq" hreflang="sq" data-title="Gjenerimi i numrave të rastësishëm" data-language-autonym="Shqip" data-language-local-name="Albanian" class="interlanguage-link-target"><span>Shqip</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/Generisanje_slu%C4%8Dajnih_brojeva" title="Generisanje slučajnih brojeva – Serbian" lang="sr" hreflang="sr" data-title="Generisanje slučajnih brojeva" data-language-autonym="Српски / srpski" data-language-local-name="Serbian" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/Rastgele_say%C4%B1_%C3%BCretimi" title="Rastgele sayı üretimi – Turkish" lang="tr" hreflang="tr" data-title="Rastgele sayı üretimi" data-language-autonym="Türkçe" data-language-local-name="Turkish" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%93%D0%B5%D0%BD%D0%B5%D1%80%D0%B0%D1%86%D1%96%D1%8F_%D0%B2%D0%B8%D0%BF%D0%B0%D0%B4%D0%BA%D0%BE%D0%B2%D0%B8%D1%85_%D1%87%D0%B8%D1%81%D0%B5%D0%BB" title="Генерація випадкових чисел – Ukrainian" lang="uk" hreflang="uk" data-title="Генерація випадкових чисел" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-ur mw-list-item"><a href="https://ur.wikipedia.org/wiki/%D8%AA%D8%B5%D8%A7%D8%AF%D9%81%DB%8C_%D8%B9%D8%AF%D8%AF_%D9%85%D9%88%D9%84%D9%91%D8%AF" title="تصادفی عدد مولّد – Urdu" lang="ur" hreflang="ur" data-title="تصادفی عدد مولّد" data-language-autonym="اردو" data-language-local-name="Urdu" class="interlanguage-link-target"><span>اردو</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E9%9A%8F%E6%9C%BA%E6%95%B0%E7%94%9F%E6%88%90" title="随机数生成 – Chinese" lang="zh" hreflang="zh" data-title="随机数生成" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li><li class="interlanguage-link interwiki-zh-min-nan mw-list-item"><a href="https://zh-min-nan.wikipedia.org/wiki/Lo%C4%81n-s%C3%B2%CD%98_s%C3%A1n-seng" title="Loān-sò͘ sán-seng – Minnan" lang="nan" hreflang="nan" data-title="Loān-sò͘ sán-seng" data-language-autonym="閩南語 / Bân-lâm-gú" data-language-local-name="Minnan" class="interlanguage-link-target"><span>閩南語 / Bân-lâm-gú</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/%E9%9A%A8%E6%A9%9F%E6%95%B8%E7%94%9F%E6%88%90" title="隨機數生成 – Cantonese" lang="yue" hreflang="yue" data-title="隨機數生成" data-language-autonym="粵語" data-language-local-name="Cantonese" class="interlanguage-link-target"><span>粵語</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q228206#sitelinks-wikipedia" title="Baguhin ang link sa ibang wika" class="wbc-editpage">baguhin ang mga link</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespace"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Random_number_generation" title="Tingnan ang nilalaman [c]" accesskey="c"><span>Artikulo</span></a></li><li id="ca-talk" class="new vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Usapan:Random_number_generation&action=edit&redlink=1" rel="discussion" class="new" title="Usapan tungkol sa nilalaman nito (hindi pa naisusulat) [t]" accesskey="t"><span>Usapan</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Ibahin ang baryante o variant ng wika" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tagalog</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Mga tingin"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Random_number_generation"><span>Basahin</span></a></li><li id="ca-ve-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Random_number_generation&veaction=edit" title="Baguhin ito [v]" accesskey="v"><span>Baguhin</span></a></li><li id="ca-edit" class="collapsible vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Random_number_generation&action=edit" title="Baguhin ang kodigong batayan ng pahinang ito [e]" accesskey="e"><span>Baguhin ang wikitext</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Random_number_generation&action=history" title="Nakaraang pagbabago sa pahinang ito [h]" accesskey="h"><span>Tingnan ang kasaysayan</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Mga kagamitan" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Mga kagamitan</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Mga kagamitan</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">ilipat sa gilid</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">itago</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Mga aksyon </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Random_number_generation"><span>Basahin</span></a></li><li id="ca-more-ve-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Random_number_generation&veaction=edit" title="Baguhin ito [v]" accesskey="v"><span>Baguhin</span></a></li><li id="ca-more-edit" class="collapsible vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Random_number_generation&action=edit" title="Baguhin ang kodigong batayan ng pahinang ito [e]" accesskey="e"><span>Baguhin ang wikitext</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Random_number_generation&action=history"><span>Tingnan ang kasaysayan</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> Pangkalahatan </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Natatangi:Ano_ang_nakakawing_dito/Random_number_generation" title="Talaan ng mga pahinang wiking nakaturo rito. [j]" accesskey="j"><span>Mga nakaturo rito</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Natatangi:Nakakawing_ng_kamakailang_pagbabago/Random_number_generation" rel="nofollow" title="Mga huling binago sa mga kaugnay na pahina mula sa pahinang ito [k]" accesskey="k"><span>Kaugnay na pagbabago</span></a></li><li id="t-upload" class="mw-list-item"><a href="//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=tl" title="Magkarga ng mga larawan o iba pang midya [u]" accesskey="u"><span>Mag-upload ng file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Natatangi:Natatanging_mga_pahina" title="Tala ng mga natatanging pahina [q]" accesskey="q"><span>Natatanging pahina</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Random_number_generation&oldid=2031748" title="Ibigay ang palagiang kawing para sa kasalukuyang bersyon ng pahinang ito"><span>Permanenteng link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Random_number_generation&action=info" title="More information about this page"><span>Impormasyon ng pahina</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Natatangi:Sipiin&page=Random_number_generation&id=2031748&wpFormIdentifier=titleform" title="Impormasyon sa pagsangguni sa pahinang ito"><span>Sumangguni</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Natatangi:UrlShortener&url=https%3A%2F%2Ftl.wikipedia.org%2Fwiki%2FRandom_number_generation"><span>Kumuha ng pinaikling URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Natatangi:QrCode&url=https%3A%2F%2Ftl.wikipedia.org%2Fwiki%2FRandom_number_generation"><span>I-download ang QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> I-print/I-export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-create_a_book" class="mw-list-item"><a href="/w/index.php?title=Natatangi:Aklat&bookcmd=book_creator&referer=Random+number+generation"><span>Lumikha ng isang aklat</span></a></li><li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Natatangi:DownloadAsPdf&page=Random_number_generation&action=show-download-screen"><span>I-download bilang PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Random_number_generation&printable=yes" title="Ipakita ang bersyon ng pahinang itong madaling maililimbag [p]" accesskey="p"><span>Bersyong mapi-print</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> Sa iba pang proyekto </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q228206" title="Link sa nakakonektang item sa repositoryo ng datos [g]" accesskey="g"><span>Item na Wikidata</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Itsura"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Itsura</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">ilipat sa gilid</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">itago</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">Mula sa Wikipedia, ang malayang ensiklopedya</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="tl" dir="ltr"><style data-mw-deduplicate="TemplateStyles:r1973446">.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}html.client-js body.skin-minerva .mw-parser-output .mbox-text-span{margin-left:23px!important}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}</style><table class="box-Underlinked plainlinks metadata ambox ambox-style" role="presentation"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Ambox_wikify.svg/40px-Ambox_wikify.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Ambox_wikify.svg/60px-Ambox_wikify.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Ambox_wikify.svg/80px-Ambox_wikify.svg.png 2x" data-file-width="620" data-file-height="620" /></span></span></div></td><td class="mbox-text"><div class="mbox-text-span">Ang artikulong ito ay <b>nangangailangan pa ng <a href="https://en.wikipedia.org/wiki/Wikipedia:Manual_of_Style/Linking" class="extiw" title="en:Wikipedia:Manual of Style/Linking">mga link sa ibang mga artikulo</a> upang makatulong <a href="https://en.wikipedia.org/wiki/WP:BUILD" class="extiw" title="en:WP:BUILD">isama ito sa ensiklopedya</a></b>.<span class="hide-when-compact"> Pakitulungang <a class="external text" href="https://tl.wikipedia.org/w/index.php?title=Random_number_generation&action=edit">pabutihin ang artikulo</a> sa pamamagitan ng pagdagdag ng mga link <a href="https://en.wikipedia.org/wiki/Wikipedia:Only_make_links_that_are_relevant_to_the_context" class="extiw" title="en:Wikipedia:Only make links that are relevant to the context">na may kaugnayan sa konteksto</a> sa loob ng mayroon nang teksto.</span> <span class="date-container"><i>(<span class="date">Disyembre 2013</span>)</i></span></div></td></tr></tbody></table> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1973446"><table class="box-Ulila plainlinks metadata ambox ambox-style ambox-Orphan" role="presentation" style="display: none"><tbody><tr><td class="mbox-image"><div class="mbox-image-div"><span typeof="mw:File"><a href="/wiki/Talaksan:Wiki_letter_w.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Wiki_letter_w.svg/40px-Wiki_letter_w.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Wiki_letter_w.svg/60px-Wiki_letter_w.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Wiki_letter_w.svg/80px-Wiki_letter_w.svg.png 2x" data-file-width="44" data-file-height="44" /></a></span></div></td><td class="mbox-text"><div class="mbox-text-span">Ang article <b>ay isang <a href="/wiki/Wikipedia:Orphan" class="mw-redirect" title="Wikipedia:Orphan">Ulila</a>, dahil walang ibang mga artikulo ang <a class="external text" href="https://tl.wikipedia.org/w/index.php?title=Natatangi:WhatLinksHere&target=Random_number_generation&namespace=0">naka-link dito</a></b>. Mangyaring mula sa <a href="/wiki/Tulong:Link" class="mw-redirect" title="Tulong:Link">ipinakilala ang mga link</a> sa pahinang ito mula sa <span class="plainlinks"><a class="external text" href="https://tl.wikipedia.org/w/index.php?title=Special%3ASearch&redirs=1&search=Random+number+generation&fulltext=Search&ns0=1&title=Special%3ASearch&advanced=1&fulltext=Random+number+generation">mga kaugnay na artikulo</a></span>; subukan mo ang <a rel="nofollow" class="external text" href="//edwardbetts.com/find_link?q=Random_number_generation">Find link tool</a> para sa mga mungkahi. <span class="date-container"><i>(<span class="date">Disyembre 2013</span>)</i></span></div></td></tr></tbody></table> <p>Ang <i><b>Random Number Generation</b></i> ay isinasagawa bilang bahagi ng <a href="/wiki/Simulasyon" title="Simulasyon">simulasyon</a>. Layunin ng <i>random number generation</i> ang makalikha ng mga <i>random</i> na numero na may <i>uniform continuous distribution</i> mula 0 hanggang 1. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading3"><h3 id="Pseudo-random_Numbers">Pseudo-random Numbers</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Random_number_generation&veaction=edit&section=1" title="Baguhin seksiyon: Pseudo-random Numbers" class="mw-editsection-visualeditor"><span>baguhin</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Random_number_generation&action=edit&section=1" title="Edit section's source code: Pseudo-random Numbers"><span>baguhin ang wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Ang simpleng katotohanan na may metodong sinusunod sa paglikha ng <i>random numbers</i> ay nag-aalis ng totoong potensiyal para sa <i>randomness</i>. Kung ang metodo ay nauulit para lumikha ng <i>random numbers</i>, ay hindi nga matatawag na tunay na <i>random</i> ang <i>numbers</i> na ito. </p> <div class="mw-heading mw-heading2"><h2 id="Pamamaraan_ng_Paglikha_ng_Random_Numbers">Pamamaraan ng Paglikha ng Random Numbers</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Random_number_generation&veaction=edit&section=2" title="Baguhin seksiyon: Pamamaraan ng Paglikha ng Random Numbers" class="mw-editsection-visualeditor"><span>baguhin</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Random_number_generation&action=edit&section=2" title="Edit section's source code: Pamamaraan ng Paglikha ng Random Numbers"><span>baguhin ang wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Linear_Congruential_Method"><b>Linear Congruential Method</b></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Random_number_generation&veaction=edit&section=3" title="Baguhin seksiyon: Linear Congruential Method" class="mw-editsection-visualeditor"><span>baguhin</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Random_number_generation&action=edit&section=3" title="Edit section's source code: Linear Congruential Method"><span>baguhin ang wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading4"><h4 id="Mixed_Congruential_Method">Mixed Congruential Method</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Random_number_generation&veaction=edit&section=4" title="Baguhin seksiyon: Mixed Congruential Method" class="mw-editsection-visualeditor"><span>baguhin</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Random_number_generation&action=edit&section=4" title="Edit section's source code: Mixed Congruential Method"><span>baguhin ang wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Upang makalikha ng <i>random numbers</i>, gagamiting ang sumusunod na pormula: <br /> <b>X{i + 1} = ([a * X{i}] + c) mod m </b><br /> Kung saan, </p> <dl><dd>X{0} = binhi o <i>seed</i></dd> <dd>X{i} = ika-{i} na <i>random number</i> na nalilkha</dd> <dd>a = hindi nagbabagong <i>multiplier</i></dd> <dd>c = dagdag o <i>increment</i></dd> <dd>m = <i>modulus</i></dd></dl> <p>Ang pagpili ng X{0}, a, c, at m ay may malaking epekto sa estatistikong katangian ng mga <i>random numbers</i> na malilikha at sa haba ng isang <i>cycle</i>. Ang haba ng isang <i>cycle</i> ay ang dami ng iba-ibang <i>random numbers</i> na malilikha bago ito umulit. </p> <div class="mw-heading mw-heading4"><h4 id="Multiplicative_Congruential_Method">Multiplicative Congruential Method</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Random_number_generation&veaction=edit&section=5" title="Baguhin seksiyon: Multiplicative Congruential Method" class="mw-editsection-visualeditor"><span>baguhin</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Random_number_generation&action=edit&section=5" title="Edit section's source code: Multiplicative Congruential Method"><span>baguhin ang wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Sa metodong ito, gagamitin naman ang susunod na pormula, <br /> <b>X{i + 1} = (a * X{i}) mod m </b><br /> Kung saan, </p> <dl><dd>X{0} = binhi o <i>seed</i></dd> <dd>X{i} = ika-{i} na <i>random number</i> na nalilkha</dd> <dd>a = hindi nagbabagong <i>multiplier</i></dd> <dd>m = <i>modulus</i></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Midsquare_Method">Midsquare Method</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Random_number_generation&veaction=edit&section=6" title="Baguhin seksiyon: Midsquare Method" class="mw-editsection-visualeditor"><span>baguhin</span></a><span class="mw-editsection-divider"> | </span><a href="/w/index.php?title=Random_number_generation&action=edit&section=6" title="Edit section's source code: Midsquare Method"><span>baguhin ang wikitext</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Ang metodong ito ay nakalilikha ng <i>random numbers</i> na may <i>even</i> na bilang ng <i>digits</i>. Ang mga hakbang sa pagsasagawa ng <i>midsquare method</i> ay ang mga sumusunod: <br /> 1. Italaga ang <b>k</b> bilang dami ng <i>digits</i> ng <i>random numbers</i> na nais malilikha. <br /> </p> <dl><dd>Ang <b>k</b> ay dapat isang <i>even</i> na bilang.</dd></dl> <p>2. Magtakda ng isang <i>value</i> ng binhi o <i>seed</i> na X{0}. <br /> </p> <dl><dd>Ang <i>value</i> na ito ay dapat may <b>k</b> na bilang ng <i>digits</i>.</dd></dl> <p>3. Magtalaga ng isang <i>variable</i> na <b>i</b> = 0. <br /> 4. Kalkulahin ang X{i}^2. <br /> 5. Kung ang bilang ng <i>digits</i> sa nakuha sa ikaapat na hakbang ay <b>2k</b>, gawin ang ikapitong hakbang. Kung hindi, gawin ang ikaanim na hakbang. <br /> 6. Magdagdag ng mga <i>zero</i> sa unahan ng numerong nakuha sa ikatlong bilang upang ang maging bilang ng <i>digits</i> nito ay <b>2k</b>. <br /> 7. Dagdagan ng isa ang <b>i</b>. <br /> 8. Kunin ang nasa gitnang <b>k</b> na digits mula sa nakuha sa ikatlo o ikaanim na hakbang na may <b>2k</b> na <i>digits</i>. <br /> </p> <dl><dd>Ito ang magiging X{i}</dd></dl> <p>9. Kung hindi pa sapat ang bilang na nalikhang <i>random numbers</i>, bumalik sa ikaapat na hakbang. </p> <!-- NewPP limit report Parsed by mw‐api‐int.codfw.canary‐6799bc7f99‐h8mxm Cached time: 20241126014549 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] CPU time usage: 0.076 seconds Real time usage: 0.122 seconds Preprocessor visited node count: 157/1000000 Post‐expand include size: 8158/2097152 bytes Template argument size: 42/2097152 bytes Highest expansion depth: 8/100 Expensive parser function count: 1/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 3300/5000000 bytes Lua time usage: 0.040/10.000 seconds Lua memory usage: 921121/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 102.599 1 -total 91.68% 94.064 2 Padron:Ambox 69.39% 71.197 1 Padron:Underlinked 30.53% 31.327 1 Padron:Orphan 18.08% 18.546 1 Padron:Monthyear 1.77% 1.820 2 Padron:PAGENAMEU 1.39% 1.425 1 Padron:Monthyear-1 --> <!-- Saved in parser cache with key tlwiki:pcache:idhash:161067-0!canonical and timestamp 20241126014549 and revision id 2031748. Rendering was triggered because: api-parse --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1&useformat=desktop" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Kinuha sa "<a dir="ltr" href="https://tl.wikipedia.org/w/index.php?title=Random_number_generation&oldid=2031748">https://tl.wikipedia.org/w/index.php?title=Random_number_generation&oldid=2031748</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Natatangi:Mga_kategorya" title="Natatangi:Mga kategorya">Kategorya</a>: <ul><li><a href="/w/index.php?title=Kategorya:Mga_artikulo_na_kakaunting_wikilinks_-_Disyembre_2013&action=edit&redlink=1" class="new" title="Kategorya:Mga artikulo na kakaunting wikilinks - Disyembre 2013 (hindi pa naisusulat)">Mga artikulo na kakaunting wikilinks - Disyembre 2013</a></li><li><a href="/wiki/Kategorya:Pagkaalisaga" title="Kategorya:Pagkaalisaga">Pagkaalisaga</a></li><li><a href="/wiki/Kategorya:Estadistika" title="Kategorya:Estadistika">Estadistika</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Nakatagong kategorya: <ul><li><a href="/wiki/Kategorya:Articles_with_invalid_date_parameter_in_template" title="Kategorya:Articles with invalid date parameter in template">Articles with invalid date parameter in template</a></li><li><a href="/wiki/Kategorya:Lahat_ng_mga_artikulong_na_may_kakauting_wikilinks" title="Kategorya:Lahat ng mga artikulong na may kakauting wikilinks">Lahat ng mga artikulong na may kakauting wikilinks</a></li><li><a href="/wiki/Kategorya:Lahat_ng_mga_artikulong_ulila" title="Kategorya:Lahat ng mga artikulong ulila">Lahat ng mga artikulong ulila</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> Huling pagbabago: 18:52, 8 Hulyo 2023.</li> <li id="footer-info-copyright">Magagamit ang teksto sa ilalim ng <a rel="nofollow" class="external text" href="//creativecommons.org/licenses/by-sa/4.0/">Lisensyang Creative Commons Attribution/Share-Alike</a>; maaaring mailapat ang karagdagang termino. Tingnan ang <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">Takdang Gamit</a> para sa mga detalye.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Patakaran sa Pagkapribado</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:Patungkol">Patungkol sa Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:Pangkalahatang_pagtatanggi">Pagtatanggi</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Kodigo ng Paggawi</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Mga Developer</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/tl.wikipedia.org">Estadistika</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Tungkol sa Cookie</a></li> <li id="footer-places-mobileview"><a href="//tl.m.wikipedia.org/w/index.php?title=Random_number_generation&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Itsura sa mobile</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-7fc47fc68d-8x2zs","wgBackendResponseTime":122,"wgPageParseReport":{"limitreport":{"cputime":"0.076","walltime":"0.122","ppvisitednodes":{"value":157,"limit":1000000},"postexpandincludesize":{"value":8158,"limit":2097152},"templateargumentsize":{"value":42,"limit":2097152},"expansiondepth":{"value":8,"limit":100},"expensivefunctioncount":{"value":1,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":3300,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 102.599 1 -total"," 91.68% 94.064 2 Padron:Ambox"," 69.39% 71.197 1 Padron:Underlinked"," 30.53% 31.327 1 Padron:Orphan"," 18.08% 18.546 1 Padron:Monthyear"," 1.77% 1.820 2 Padron:PAGENAMEU"," 1.39% 1.425 1 Padron:Monthyear-1"]},"scribunto":{"limitreport-timeusage":{"value":"0.040","limit":"10.000"},"limitreport-memusage":{"value":921121,"limit":52428800}},"cachereport":{"origin":"mw-api-int.codfw.canary-6799bc7f99-h8mxm","timestamp":"20241126014549","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Random number generation","url":"https:\/\/tl.wikipedia.org\/wiki\/Random_number_generation","sameAs":"http:\/\/www.wikidata.org\/entity\/Q228206","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q228206","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2011-03-23T16:23:47Z","dateModified":"2023-07-08T18:52:45Z"}</script> </body> </html>