Math::...::Free(3pm)
π Math::Random::Free β the manual, bestie edition π
okay so you're reading the Math::Random::Free page, which is part of the Perl documentation suite (man section 3pm, for the record π). Buckle up, it's giving "we freed the code" and honestly we ATE.
β¨ NAME β¨
Math::Random::Free β a free drop-in replacement for Math::Random. periodt π
πΈ DESCRIPTION πΈ
So basically: this is a free (see below, bestie, the tea is in MOTIVATION) implementation of Math::Random 0.72, and it serves as a drop-in replacement for that module. no cap π«Ά
π₯ MOTIVATION π₯
Math::Random is a great and widely-used module for the generation of random numbers and permutations. iconic. obsessed. truly the moment. π
But β and this is the part that gives us the ick π β despite being open-source, Math::Random does not fulfill free open-source software definitions as established by the Open Source Initiative (<https://opensource.org/osd>) and the Debian Project (<https://www.debian.org/social_contract#guidelines>, a.k.a. DFSG). The way that the randlib code cannot be copied nor distributed for direct commercial advantage is actually so not it. π€
Math::Random::Free is created to free the code depending on Math::Random from these limitations. slay. π
β¨
π SUPPORT π
here's what you get exported, bestie β look at these lists, they're gorgeous:
our @EXPORT = qw(
random_normal
random_permutation
random_permuted_index
random_set_seed_from_phrase
);
our @EXPORT_OK = qw(
random_exponential
random_normal
random_permutation
random_permuted_index
random_set_seed_from_phrase
random_uniform
random_uniform_integer
);
π CAVEATS π
okay listen, this is the important part, don't skip it π
- This module has only a subset of
Math::Randomsubroutines (contributions welcome π), implemented using either Perl core subroutines or other well-known modules. - Thus
Math::Random::Freeis neither as complete, nor as fast, nor as random asMath::Random. yeah. we said it. π - Also
Math::Random::Freedoes not aim for cryptographic security. so don't do crimes with it, and definitely don't do security with it π«π
β οΈ WhileMath::Random::Freesupports seed setting, it does that differently fromMath::Random. It means that one should not expect the same seed producing identical random sequences in both modules. like, do not assume, bestie. π
π AsMath::Random::FreeemploysList::Utilfor producing random permutations, these are influenced by$List::Util::RANDvariable. iykyk. β¨
π¦ TESTED WITH π¦
Graph::Maker0.02
a whole one (1) thing and it's iconic for it π
π AUTHOR π
Andrius Merkys, <mailto:merkys@cpan.org> β thank you for your service, king π«Ά
and that's the whole page, bestie!! this was perl v5.36.0, dated 2022-10-15, and it's the Math::Random::Free(3pm) page β go forth and be random (but not cryptographically, we been knew ππβ¨)
π¦ where this page comes from
- ubuntu noble: libmath-random-free-perl 0.2.0-2 Β· BSD-3-Clause
- ubuntu resolute: libmath-random-free-perl 0.2.0-2 Β· BSD-3-Clause
- ubuntu stonking: libmath-random-free-perl 0.2.0-2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms