randb() produces different results on different machines with RNG_reset

2012-11-09
2012-11-12
  • Bogdan Cristea

    Bogdan Cristea - 2012-11-09

    The following code:
    RNG_reset(0);
    bvec bits = randb(2500);
    produces different results on different machines with same OS (openSUSE 12.1 x86_64).
    Could you confirm this behavior ?

     
  • andy_panov

    andy_panov - 2012-11-10
    SSE2 can be an issue. __SSE2__ instruction set can be used on some machines to speed things up. Check if you have __SSE2__ defined. I do not see any other reasons for such behavior.
    

    PS there can unpredictable things happen if you call rng functions simultaneously from several threads.

     
    Last edit: andy_panov 2012-11-10
  • andy_panov

    andy_panov - 2012-11-10

    I've just finished testing the RNG core. Doubles are within 5*epsilon range from the original implementation by Mutsuo Saito, Makoto Matsumoto (They provide some test vectors)

     
    • andy_panov

      andy_panov - 2012-11-11

      One more thing - SSE2 support seems to be broken (test fails with SSE2 enabled on msvc). I'll try to look into it and provide a fix.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks