Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Curved Random Distribution

by Adam (Vicar)
on Oct 18, 2005 at 16:17 UTC ( [id://501053]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $pErr = 5; # for plus/minus 5.
    sub MakeP { my $p = $_[0]; $p -= $pErr; $p += int(rand() * 2 * ($pErr 
    ++ 0.5)); return $p / 100 }
    ...
            ++$count; shift @foo }
        printf "%f\t%6d\n", $next, $count;
    }
    
  2. or download this
    sub MakeP { 
       my $p = $_[0];
    ...
       $p += int( rand() * 2 * ( $e + 0.5 ) ); 
       return $p / 100
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://501053]
Approved by larryp
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-19 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found