in reply to Re^4: Make random numbers
in thread Make random numbers

I am probably not the only Monk who wonders what the OP is going to do with this array of numbers?

In addition, I wondered whether someone should point out to the OP that solutions given so far provide pseudorandom (not random) numbers. But I decided (for my own convenience) that such considerations were not relevant to the exercise being undertaken.

Cheers,
Rob

Replies are listed 'Best First'.
Re^6: Make random numbers
by Marshall (Canon) on Dec 09, 2018 at 19:58 UTC
    Yes, I also thought that pointing this out wouldn't be helpful to the OP. There are also "better" pseudo random algorithms than the standard rand() function - algorithms that give a more even distribution of numbers and do better on other statistical measures at the expense of more computational effort. I'm sure none of this matters to the OP. Basically given the hints provided, if the OP couldn't come close to my one Perl line, the chance of any significant computation using the results is close to zero.

    To get really random numbers, you need a piece of hardware that quantifies some physical random phenomenon. I haven't checked in on the Princeton EGG Project in awhile. I suspect that their hardware is pretty good.

      I suspect that their hardware is pretty good.

      Let's hope so; their wetware sucks.


      Give a man a fish:  <%-{-{-{-<

        I don't know any details about their SW or HW. I haven't checked in on the Princeton EGG Project in awhile. I mean more than a decade. But even so, its an interesting project.

        Interesting project, but far off the original question.

Re^6: Make random numbers
by Ratazong (Monsignor) on Dec 07, 2018 at 12:40 UTC
    I wondered whether someone should point out to the OP that solutions given so far provide pseudorandom (not random) numbers

    ... except the solution provided by soonix of course, which produces a guaranteed random number ;-)

    TGIF, Rata

      except the solution provided by soonix of course, which produces a guaranteed random number ;-)

      Heh ... yeah, I missed that reply.

      Though I do think it rather naive that the "flip of a coin" or "the roll of a fair die" should be deemed as unconditionally producing a random result.
      These events produce random results only if the person flipping the coin or rolling the die is completely unskilled in influencing the outcome ... yet this caveat is seldom mentioned ;-)

      Cheers,
      Rob