Easy to use random number test suite?

This is a discussion on Easy to use random number test suite? within the General Discussions forums, part of the Community Boards category; I've been through a whole load of so-called RNG testers, and so far I've had no luck finding one that ...

  1. #1
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708

    Easy to use random number test suite?

    I've been through a whole load of so-called RNG testers, and so far I've had no luck finding one that was easy to use. I finally settled on the NIST's test suite because it looked ok from the outset, but it's turned out to be a real hassle to use. First you have to put your data in an akward file format, then you have to follow the goofy console menu which has you do things like: There are 14 tests. To indicate which ones to run enter a binary number where each bit indicates whether that particular test is to be invoked. After you get through all of the painful input sequences, it finally runs the test on you file and let's you know it's done with "Statistical Testing Complete!!!!!!!!!!!!". Ready for the next file?

    So...I'm looking for something a little more flexible. Does anyone know of a simple program that can do this?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  2. #2
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,260
    That sounds a little like Marsaglia's "Diehard" tests which is what I would have recommended.

    Soma

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    >> That sounds a little like Marsaglia's "Diehard" tests which is what I would have recommended.

    Tried that one as well - equally painful.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    OK, well it looks like the GNU Scientific Library is what I was looking for.
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. random number gen & looping probelm :?
    By FoxeySoulSLayer in forum C++ Programming
    Replies: 1
    Last Post: 04-10-2009, 05:44 PM
  2. adding a number to a number
    By bigmac(rexdale) in forum C Programming
    Replies: 11
    Last Post: 10-24-2007, 12:56 PM
  3. How do I restart a random number sequence.
    By jeffski in forum C Programming
    Replies: 6
    Last Post: 05-29-2003, 02:40 PM
  4. random number
    By mrukok in forum C++ Programming
    Replies: 7
    Last Post: 03-16-2003, 07:04 PM
  5. fast random number generation
    By Heraclitus in forum C Programming
    Replies: 4
    Last Post: 02-09-2003, 06:48 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21