.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "TT800 3pm" .TH TT800 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Math::Random::TT800 \- Matsumoto's TT800 Pseudorandom number generator .SH DESCRIPTION .IX Header "DESCRIPTION" This perl extension module implements M. Matsumoto's twisted generalized shift register generator called TT800 as described in his article published in ACM Transactions on Modelling and Computer Simulation, Vol. 4, No. 3, 1994, pages 254\-266. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Math::Random::TT800; \& \& my $tt = new Math::Random::TT800; \& \& $value = $tt\->next(); \& \& $ivalue = $tt\->next_int(); .Ve .SH FUNCTIONS .IX Header "FUNCTIONS" .IP new 4 .IX Item "new" .Vb 2 \& my $tt = new Math::Random::TT800; \& my $tt = new Math::Random::TT800 @seeds; .Ve .Sp Create a new TT800 object. Providing seeds is optional. A TT800 takes 25 integers as seed which must not be all zero. If less than 25 integers are supplied, the rest are taken from the default seed. .IP next 4 .IX Item "next" .Vb 1 \& $value = $tt\->next(); .Ve .Sp next returns the next pseudorandom number from the TT800 object as a floating point value in the range [0,1). .IP next_int 4 .IX Item "next_int" .Vb 1 \& $ivalue = $tt\->next_int(); .Ve .Sp next_int returns a integer value filled with 32 random bits. .SH COPYRIGHT .IX Header "COPYRIGHT" This implementation is based on the C code by M. Matsumoto available from ftp://random.mat.sbg.ac.at/pub/data/tt800.c. .PP Converted to a perl extension module and enhancements to support multiple streams of pseudorandom numbers by Otmar Lendl . .PP Copyright (c) 1997 by Otmar Lendl (Perl and XS code). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.