TT800(3pm)

πŸ’– NAME πŸ’–

Math::Random::TT800 β€” Matsumoto's TT800 Pseudorandom number generator 🎲✨


🌸 DESCRIPTION 🌸

okay so bestie, this perl extension module implements M. Matsumoto's twisted generalized shift register generator called TT800, exactly as described in his article published in ACM Transactions on Modelling and Computer Simulation, Vol. 4, No. 3, 1994, pages 254-266. iykyk πŸ“šπŸ’…


✨ SYNOPSIS ✨

        use Math::Random::TT800;

        my $tt = new Math::Random::TT800;

        $value = $tt->next();

        $ivalue = $tt->next_int();

πŸ¦‹ FUNCTIONS πŸ¦‹

πŸŽ€ new

        my $tt = new Math::Random::TT800;
        my $tt = new Math::Random::TT800 @seeds;

Create a new TT800 object 🫢. Providing seeds is optional β€” no pressure, she's flexible. A TT800 takes 25 integers as seed which must not be all zero πŸ’€ (like, do NOT do that). If less than 25 integers are supplied, the rest are taken from the default seed. so it just fills in the blanks for you, slay 🌈

🧚 next

        $value = $tt->next();

next returns the next pseudorandom number from the TT800 object as a floating point value in the range [0,1). so like, zero is invited to the party but one absolutely is not πŸ™ˆπŸ“

⭐ next_int

        $ivalue = $tt->next_int();

next_int returns a integer value filled with 32 random bits πŸ”₯ that's a whole lotta randomness bestie, 32 of them fr fr πŸ‘‘


This implementation is based on the C code by M. Matsumoto <matumoto@math.keio.ac.jp> available from ftp://random.mat.sbg.ac.at/pub/data/tt800.c.

Converted to a perl extension module and enhancements to support multiple streams of pseudorandom numbers by Otmar Lendl <lendl@cosy.sbg.ac.at>.

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. πŸ’–


no cap, that's the whole page bestie πŸ’…

okay bye ily, this was perl v5.42.3 dated 2026-08-19 and she ate πŸŒΈβœ¨πŸ¦‹

πŸ“¦ where this page comes from