English     Español
[Main Index] : Programming : Languages : Perl : CPAN Modules : Data Type Utilities : Math
 Math::LogRand CPAN (Perl) Module 

Search

 

Documents

Math::LogRand - Perl extension for return a random number with log weighting. (Displayed)

Math::LogRand - Perl extension for return a random number with log weighting.


NAME

Math::LogRand - Perl extension for return a random number with log weighting.


SYNOPSIS

  use Math::LogRand;
  my %test;
  for (0.1000){ ++$%test{LogRand($min,$max)} }
  foreach (keys %test){ print "$_\toccured$test{$_} times.\n" }
  exit;


DESCRIPTION

Accepts arguments: the floor of distribution, and the ceilling of distribution.

Returns a 'random' integer produced by the Perl rand() function, between input parameters, with weighting to low integers by log distribution.

How good/bad this is, I don't know: it's really for my own convenience, but I hope you find it useful. Any suggestions really very gratefully received!

EXPORT

        LogRand


AUTHOR

Lee Goddard <lgoddard@cpan.org>


SEE ALSO

        perl(1);
        rand;

Information

This site is currently in testing, it is not yet operating using the full database. Until it is officially launched you may wish to visit Help-Site Computer Manuals. After launch, this site (HelpSpy) will replace Help-Site. Information about the spider which is currently trawling the Internet looking for links to add to this directory can be found here.
   

©Copyright Nicholas Reynolds 2004