Git Product home page Git Product logo

mersenne-twister-gnur's Introduction

mersenne-twister-gnur

A Mersenne-Twister implementation modeled after and validated with GNU R's RNG.c.

This is the PRNG in Renjin, a JVM-based interpreter for R.

Examples

Getting Ten Random Doubles with GNU R

set.seed(4357);
runif(10);
output: 0.4478791 0.8817665 0.8387621 0.6334931 0.3799481 0.8501577 0.8934669 0.5206094 0.5182715 0.6667043

Same Results Using mersenne-twister-gnur

RNG.setSeed(4357);
double[] results = RNG.runif(10);
System.out.println(Arrays.toString(results));
output:  [0.44787912303581834, 0.8817665143869817, 0.8387620681896806, 0.6334931093733758, 0.37994811101816595, 0.8501577137503773, 0.8934669292066246, 0.5206093506421894, 0.5182715305127203, 0.6667043350171298]

mersenne-twister-gnur's People

Contributors

acaloiaro avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.