Giter VIP home page Giter VIP logo

small-rngs's People

Contributors

pitdicker avatar theironborn avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

small-rngs's Issues

Explain the Xoroshiro MT construction?

fn next_u32(&mut self) -> u32 {

Two things I don't understand about this construction:

  1. The shift and rotate constants do not correspond to the Xoroshiro128+ PRNG โ€” why are they different?
  2. You have used a 64-bit PRNG to implement next_u32 then called it twice for next_u64. Obviously discarding more bits can improve quality at the cost of performance, but why not just implement next_u64 directly โ€” that would be much faster, right?

Did this design come from O'Neill's work? I don't see an implementation on her site.

Also worth noting is Xoroshiro128** which is similar, but uses the same construction critiqued here to "multiply" the result. I'm not really sure what to make of that, other than this "fast multiplication" has worse avalanche than a regular 64-bit multiplication.

MSWS seems incorrect

This lib outputs the full 64-bits while the reference implementation only outputs 32-bits. (It also adds the Weyl sequence after squaring instead of before squaring)

inline static uint32_t msws() {

   x *= x; x += (w += s); return x = (x>>32) | (x<<32);

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.