xorshift-plus: Simple implementation of xorshift+ PRNG

[ bsd3, library, math ] [ Propose Tags ]

[Skip to Readme]
Versions [faq] 0.1.0.0
Change log CHANGELOG.md
Dependencies base (>=4.12.0.0 && <4.13), ghc-prim [details]
License BSD-3-Clause
Author OSANAI Kazuyoshi
Maintainer osmium.k@gmail.com
Category Math
Home page https://github.com/syocy/xorshift-plus
Bug tracker https://github.com/syocy/xorshift-plus/issues
Source repo head: git clone https://github.com/syocy/xorshift-plus
Uploaded by syocy at Mon Jan 28 14:02:52 UTC 2019
Distributions NixOS:0.1.0.0
Downloads 86 total (5 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2019-01-28 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for xorshift-plus-0.1.0.0

[back to package description]

xorshift-plus

Simple implementation of xorshift+.

import Random.XorshiftPlus
main = do
  s <- genXorshiftPlusInt 1
  i <- getInt s
  print i -- 2455688531189531812

Performance

> cabal new-run --enable-benchmarks micro -- compareWithOtherPRNGs --small
Up to date
compareWithOtherPRNGs/xorshift-plus_Int (THIS PACKAGE) mean 10.63 μs  ( +- 40.63 ns  )
compareWithOtherPRNGs/xorshift-plus_Word (THIS PACKAGE) mean 10.72 μs  ( +- 36.54 ns  )
compareWithOtherPRNGs/xorshift_Int32     mean 250.5 μs  ( +- 917.1 ns  )
compareWithOtherPRNGs/xorshift_Ina64     mean 457.1 μs  ( +- 1.070 μs  )
compareWithOtherPRNGs/Xorshift128Plus_Word64 mean 24.61 μs  ( +- 111.9 ns  )