in reply to Re^2: inclusive rand
in thread inclusive rand
Unfortunately, Math::Random::Secure's dependencies have many sub-dependencies.
use strict; use warnings; use Math::Random::Secure 'irand'; # Random number between 0 and 1 inclusive (total 524288-1 numbers). sub custom_rand { irand(524288) / 524287; } printf("%f\n", custom_rand()) for 1 .. 20;
Regards, Mario.
Edit: Applied correction. Thanks pryrt.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: inclusive rand
by pryrt (Abbot) on Mar 13, 2017 at 15:28 UTC | |
by marioroy (Prior) on Mar 13, 2017 at 17:36 UTC |