Sponsored Content
Operating Systems Solaris Does Solaris have a random number generator? Post 302183875 by one_ring99 on Thursday 10th of April 2008 04:39:58 AM
Old 04-10-2008
Thanks for the tips.
The degree of randomness is not critical for me, so the print $RANDOM is fine.
I found Perderabo's script too, but it's probably more than I need at this stage.

Thanks again to all who replied.
B
 

9 More Discussions You Might Find Interesting

1. Programming

Random number generation

Hi...How can I generate random numbers between a given range ...preferably between 1 and 100...in UNIX C programming...? I tried out functions like rand(),drand48() etc but didnt get satisfactory results... Thanks a lot in advance.......... (1 Reply)
Discussion started by: tej.buch
1 Replies

2. Shell Programming and Scripting

Random Sentence Generator

Hi, I need to create a table with random sentences. I need lines that are upto 1000 characters in lenght. I need a random sentence generator that will create sentences and output it to a text file. The sentences should be of lenght varying from 1 to 1000. Does anyone know how this can be... (7 Replies)
Discussion started by: kaushys
7 Replies

3. Programming

Random number is not reused

I need to generate and reuse a 5 digit random number every time my program is executed. But the following generates random numbers every time the function is called. #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h> #include <time.h> ... (12 Replies)
Discussion started by: limmer
12 Replies

4. Shell Programming and Scripting

Need specialized random string generator script

Hi, I need a script that will generate a set of random strings in sequence, with the ability to predetermine the length, quantity, and alphabet of individual string, and to use the outputs of earlier strings in the sequence to define the parameters of later strings. For examples, I might want... (5 Replies)
Discussion started by: vajrajames
5 Replies

5. Programming

random number

How can I choose randomly the row numbers of my file in awk? (4 Replies)
Discussion started by: Homa
4 Replies

6. Shell Programming and Scripting

[Solved] Number generator

Hello, I want to generate numbers. between "0 to 100000" Thank you very much for your help. Output: 0 25 50 75 100 125 . . 100000 (4 Replies)
Discussion started by: tara123
4 Replies

7. UNIX for Dummies Questions & Answers

A crude random byte generator...

There was an upload recently on generating a pseudo-random file when /dev/random does NOT exist. This does not need /dev/random, /dev/urandom or $RANDOM either... (I assume $RANDOM relies on the /dev/random device in some way.) This code uses hexdump just because I like hexdump for ease of... (2 Replies)
Discussion started by: wisecracker
2 Replies

8. Shell Programming and Scripting

awk (or) UNIX random RGB colors generator?

Dear UNIX Friends, I was wondering if there is a random RGB color generator or any function in any unix platforms. Please share your ideas. Thanks (2 Replies)
Discussion started by: jacobs.smith
2 Replies

9. Shell Programming and Scripting

Random Password generator with 2 digits and 6 characters

I am using the below to random generate a password but I need to have 2 numeric characters and 6 alphabetic chars head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8 ; echo '' 6USUvqRB ------ Post updated at 04:43 PM ------ Any Help folks - Can the output be passed onto a sed command to... (9 Replies)
Discussion started by: infernalhell
9 Replies
Distributions(3pm)					User Contributed Perl Documentation					Distributions(3pm)

NAME
Statistics::Distributions - Perl module for calculating critical values and upper probabilities of common statistical distributions SYNOPSIS
use Statistics::Distributions; $chis=Statistics::Distributions::chisqrdistr (2,.05); print "Chi-squared-crit (2 degrees of freedom, 95th percentile " ."= 0.05 level) = $chis "; $u=Statistics::Distributions::udistr (.05); print "u-crit (95th percentile = 0.05 level) = $u "; $t=Statistics::Distributions::tdistr (1,.005); print "t-crit (1 degree of freedom, 99.5th percentile = 0.005 level) " ."= $t "; $f=Statistics::Distributions::fdistr (1,3,.01); print "F-crit (1 degree of freedom in numerator, 3 degrees of freedom " ."in denominator, 99th percentile = 0.01 level) = $f "; $uprob=Statistics::Distributions::uprob (-0.85); print "upper probability of the u distribution (u = -0.85): Q(u) " ."= 1-G(u) = $uprob "; $chisprob=Statistics::Distributions::chisqrprob (3,6.25); print "upper probability of the chi-square distribution (3 degrees " ."of freedom, chi-squared = 6.25): Q = 1-G = $chisprob "; $tprob=Statistics::Distributions::tprob (3,6.251); print "upper probability of the t distribution (3 degrees of " ."freedom, t = 6.251): Q = 1-G = $tprob "; $fprob=Statistics::Distributions::fprob (3,5,.625); print "upper probability of the F distribution (3 degrees of freedom " ."in numerator, 5 degrees of freedom in denominator, F = 6.25): " ."Q = 1-G = $fprob "; DESCRIPTION
This Perl module calculates percentage points (5 significant digits) of the u (standard normal) distribution, the student's t distribution, the chi-square distribution and the F distribution. It can also calculate the upper probability (5 significant digits) of the u (standard normal), the chi-square, the t and the F distribution. These critical values are needed to perform statistical tests, like the u test, the t test, the F test and the chi-squared test, and to calculate confidence intervals. If you are interested in more precise algorithms you could look at: StatLib: http://lib.stat.cmu.edu/apstat/ ; Applied Statistics Algorithms by Griffiths, P. and Hill, I.D., Ellis Horwood: Chichester(1985) BUGS
This final version 1.02 has been released after more than one year without a bug report on the previous version 0.07. Nevertheless, if you find any bugs or oddities, please do inform the author. INSTALLATION
See perlmodinstall for information and options on installing Perl modules. AVAILABILITY
The latest version of this module is available from the Distribution Perl Archive Network (CPAN). Please visit http://www.cpan.org/ to find a CPAN site near you or see http://www.cpan.org/authors/id/M/MI/MIKEK/ . AUTHOR
Michael Kospach <mike.perl@gmx.at> Nice formating, simplification and bug repair by Matthias Trautner Kromann <mtk@id.cbs.dk> COPYRIGHT
Copyright 2003 Michael Kospach. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Statistics::ChiSquare, Statistics::Table::t, Statistics::Table::F, perl(1). perl v5.12.4 2003-10-01 Distributions(3pm)
All times are GMT -4. The time now is 01:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy