GithubHelp home page GithubHelp logo

mersenne-random-pure64's People

Contributors

donsbot avatar bgamari avatar int-e avatar felixonmars avatar bitonic avatar

Stargazers

 avatar Shinya Yamaguchi avatar Gaarv avatar Murat Kasimov avatar Nyolfen avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

mersenne-random-pure64's Issues

On implementing split

I was surprised to find that randomRs failed with an exception because of the RandomGen default implementation based on split, which is not implemented for PureMT.

This got me curious about why it wasn't implemented, and if it could be. Is there some more insight about the state of split?

I did a few empirical tests using a naive implementation (very naive: split g = (g, pureMT $ fst $ randomWord64 g)) on random sequences of 50k elements, which appears to show an expected correlation of zero (t(99)=-0.29, 95% CI=[-0.0010, 0.00075], p=0.7694) and the same maximum cross-correlation as for independent streams (t(198)=-0.107, CI=[-5.138e-4,4.608e-4], p=0.9146). This makes me think a similar method, perhaps with some mixing, would be acceptable.

rand-corrs

Otherwise, would a method such as this be appropriate? http://www.math.sci.hiroshima-u.ac.jp/m-mat/MT/JUMP/

Missing instance of RandomGen?

In the latest version of the library, there doesn't appear to be an instance of RandomGen, whilst the documentation states there should be one. There is, however, an instance in 0.2.0.4.

Is this intentional? If it is, the documentation should probably be updated to remove the text referring to it.

build failure with time < 1.6

$ stack build mersenne-random-pure64-0.2.1.0 --resolver lts-6.13
Run from outside a project, using implicit global project config
Using resolver: lts-6.13 specified on command line
random-1.1: configure
random-1.1: build
random-1.1: copy/register
mersenne-random-pure64-0.2.1.0: download
mersenne-random-pure64-0.2.1.0: configure
mersenne-random-pure64-0.2.1.0: build
Completed 2 action(s).

--  While building package mersenne-random-pure64-0.2.1.0 using:
      /Users/adam/.stack/setup-exe-cache/x86_64-osx/setup-Simple-Cabal-1.22.5.0-ghc-7.10.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.5.0 build --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
    Logs have been written to: /Users/adam/.stack/global-project/.stack-work/logs/mersenne-random-pure64-0.2.1.0.log

    Configuring mersenne-random-pure64-0.2.1.0...
    Building mersenne-random-pure64-0.2.1.0...
    Preprocessing library mersenne-random-pure64-0.2.1.0...
    clang: warning: optimization flag '-finline-functions' is not supported
    clang: warning: argument unused during compilation: '--param max-inline-insns-single=1800'
    clang: warning: optimization flag '-finline-functions' is not supported
    clang: warning: argument unused during compilation: '--param max-inline-insns-single=1800'
    [1 of 4] Compiling System.Random.Mersenne.Pure64.Base ( .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Random/Mersenne/Pure64/Base.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Random/Mersenne/Pure64/Base.o )
    [2 of 4] Compiling System.Random.Mersenne.Pure64.Internal ( System/Random/Mersenne/Pure64/Internal.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Random/Mersenne/Pure64/Internal.o )
    [3 of 4] Compiling System.Random.Mersenne.Pure64.MTBlock ( System/Random/Mersenne/Pure64/MTBlock.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Random/Mersenne/Pure64/MTBlock.o )
    [4 of 4] Compiling System.Random.Mersenne.Pure64 ( System/Random/Mersenne/Pure64.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/System/Random/Mersenne/Pure64.o )

    /private/var/folders/sd/d9hgvrbx4dggjz1bxkpw5qgc0000gn/T/stack56422/mersenne-random-pure64-0.2.1.0/System/Random/Mersenne/Pure64.hs:64:50:
        Not in scope: diffTimeToPicoseconds

build error (cc failed) with ghc-8.10

I am using ghc-8.10.0.20191121 , and I get

Configuring mersenne-random-pure64-0.2.2.0...
...
[4 of 4] Compiling System.Random.Mersenne.Pure64 ( System/Random/Mersenne/Pure64.hs, dist/build/System/Random/Mersenne/Pure64.p_o )
cc: error: max-inline-insns-single=1800: No such file or directory
`cc' failed in phase `C Compiler'. (Exit code: 1)

The cabal file has

library
    ..
    cc-options:
        ..
        -fno-strict-aliasing --param max-inline-insns-single=1800

The command line that calls the C compiler has this:

/opt/ghc/ghc-8.10.0.20191121/bin/ghc -c -fPIC ... -optc-fno-strict-aliasing -optc--param '-optcmax-inline-insns-single=1800' ...

Perhaps the behaviour of ghc changed?

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.