Math::Random::MT::Auto 5.04
Math::Random::MT::Auto is a Perl module for auto-seeded Mersenne Twister PRNGs. SYNOPSIS use strict; use warnings; use Mat
|
|||||||||||||||||||
Math::Random::MT::Auto is a Perl module for auto-seeded Mersenne Twister PRNGs.
SYNOPSIS
use strict;
use warnings;
use Math::Random::MT::Auto qw(rand irand shuffle gaussian),
'/dev/urandom' => 256,
'random_org';
# Functional interface
my $die_roll = 1 + int(rand(6));
my $coin_flip = (irand() & 1) ? 'heads' : 'tails';
my $deck = shuffle(1 .. 52);
my $rand_IQ = gaussian(15, 100);
# OO interface
my $prng = Math::Random::MT::Auto->new('SOURCE' => '/dev/random');
my $angle = $prng->rand(360);
my $decay_interval = $prng->exponential(12.4);
The Mersenne Twister is a fast pseudorandom number generator (PRNG) that is capable of providing large volumes (> 10^6004) of "high quality" pseudorandom data to applications that may exhaust available "truly" random data sources or system-provided PRNGs such as rand.
This module provides PRNGs that are based on the Mersenne Twister.
There is a functional interface to a single, standalone PRNG, and an OO interface (based on the inside-out object model as implemented by the Object::InsideOut module) for generating multiple PRNG objects. The PRNGs are self-seeding, automatically acquiring a (19968-bit) random seed from user-selectable sources.
Requirements:
tags
Download Math::Random::MT::Auto 5.04
Authors software
Similar software
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Other software in this category
|
|
|
|
|
|
|
|
|
|
Featured Software
jEdit 4.3 pre8
jEdit is an Open Source text editor written in Java
Opera 9.02
Surf the Internet in a safer, faster, and easier way with Opera browser
GNU Aspell 0.60.4
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell
- Communications
- Database
- Desktop Environment
- Games
- Internet
- Multimedia
- Office
- Programming
- Science and Engineering
- System
- Text Editing&Processing
