Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Random numbers for windows 2000?

by tenya (Beadle)
on Apr 27, 2001 at 09:30 UTC ( [id://75999]=perlquestion: print w/replies, xml ) Need Help??

tenya has asked for the wisdom of the Perl Monks concerning the following question:

I want to test a statistical analysis. To do this I want to generate a test data set, for which I need to generate random numbers that are uniformly distributed over two orders of magnitude. Active State ppm does not seem to want to install math::random or math::rand48 on my system (ppm says that it can not find the binary, but at least math::rand48 shows up with search). Has this worked for anyone with windows 2000? Or is there another way to get good random number for my script?
Thanks

Replies are listed 'Best First'.
Re: Random numbers for windows 2000?
by t0mas (Priest) on Apr 27, 2001 at 10:16 UTC
    random.org is a good place to get random numbers.


    /brother t0mas
      Wow! Nice link. What kind of distribution has it? Wait... Let me have a check..

      Make that an uniform distribution. Since I am a biologist, I use mainly gaussion distributed noise. Luckily, the distribution can be transformed...

      Jeroen
      "We are not alone"(FZ)

Re: Random numbers for windows 2000?
by BrotherAde (Pilgrim) on Apr 27, 2001 at 16:18 UTC
    If you can't install stuff through ppm, try the old-fashioned way: Grab nmake and Math::Random then decompress the tar.gz file into a temporary directory, change into that directory and:
    perl makefile.pl nmake nmake test nmake install
    and you're done...

    Of course, you'll have to check that nmake is in your path somewhere.

    Hope that helps,
    BrotherAde

      I discovered that nmake needs the microsoft C++ compiler (cl.exe), which I do not have, sigh.
      Tye also has a useful post on modules for windows:
      Re: Installing modules on Win32. Sorry, I don't know how to hyperlink this.

      Perhaps it is not possible to port random::math to win32 system
      (which is why ActiveState has not created a binary for it).
      Does anyone have this installed on win32?
      If not, any suggestions? I need to generate about 5e6
      random integers between 0 and 99 inclusive (uniform distribution) each time I run my program.
        Aaah... I see. nmake doesn't need cl.exe per se, but it does so in connection with modules that contain code in C++. I suggest you try installing the GNU development tools and utilities for Windows. They come with perl, a version of make and gcc, the GNU C++ compiler. They also give you the power of bash on Windows, so you should have seen a *nix-box at least from a distance.

        Hope that helps, if not, drop me another note and I'll explain specifics.
        BrotherAde


        Update
        I think I might be able to get my hands on a machine that has both perl and Visual C++ installed. I might be able to rig up a binary for you, just drop me a line.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-23 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found