Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Curved Random Distribution

by blokhead (Monsignor)
on Oct 18, 2005 at 17:08 UTC ( [id://501067]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub almost_normal {
        my ($mean, $variance) = @_;
        return sqrt($variance) * atan2( rand(2) - 1, 1 ) + $mean;
    }
    
  2. or download this
    #!/usr/bin/perl -slw
    
    ...
    printf "%7.2f : %-3d : %s\n", $_, 
        $plot{ $_ }, '#' x ( $plot{ $_ } / $ITERS * 100 * $PRECISION )
        for sort{ $a <=> $b } keys %plot;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-03-28 20:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found