• This repository has been archived on 19/Jan/2022
  • Stars
    star
    26
  • Rank 898,920 (Top 19 %)
  • Language
    Erlang
  • License
    Other
  • Created about 12 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This software is no longer maintained. For archive/reference use only. -- Tiny Mersenne Twister (TinyMT) for Erlang

tinymt-erlang: Tiny Mersenne Twister (TinyMT) for Erlang

This software is no longer maintained

CAUTION: this software is no longer maintained. Migrate to the default rand module for OTP 18 and later, because they are maintained and using faster and better algorithms.

Version and credit information

  • Version: 0.3.2
  • Release date: 9-JUL-2017
  • Edited and written by Kenji Rikitake
  • Email contact: [email protected]

Travis CI build status for the master branch

Build Status

License

Copyright (c) 2012-2017 Kenji Rikitake and Kyoto University. All rights reserved.

Copyright (c) 2011-2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima University, and the University of Tokyo. All rights reserved.

See the file LICENSE for the license (new/simplified BSD license). (Note: license of rebar is Apache 2.0 License.)

Details of TinyMT algorithm

This software is based on Tiny Mersenne Twister (TinyMT) Version 1.0.1 by Mutsuo Saito (Hiroshima University) and Makoto Matsumoto (The University of Tokyo). See http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/TINYMT/index.html. Also see https://github.com/jj1bdx/TinyMT/ for my fork of the reference code.

Changes from the old version

  • make speed now compares with rand module exsplus algorithm (from 0.3.2)
  • Output X interval for uniform/0 and uniform_s/1 is now 0.0 < X < 1.0, consistent with random and rand modules (from 0.3.0)
  • Old NIF-supported version tagged as 20140409
  • Old include file can be found in version tagged as 20140409
  • NIF support removed
  • Type specs updated for 17.0 (notably array() to array:array())
  • The internal state now have opaque type tinymt32:intstate32/0
  • tinymt32:uniform_s_list/{2,3} are removed
  • EDoc comment added: do make doc for generating the documentation
  • New functions for changing generation parameters tinymt32:setgenparams/{1,3} are added
  • Common Test suite added as test/tinymt32_SUITE.erl
  • Removed EUnit code
  • HiPE options can be activatied in Makefile.tinymt

Notes

  • Output X interval for uniform/0 and uniform_s/1 is now 0.0 < X < 1.0, consistent with random and rand modules (from 0.3.0)

  • Test bug: In versions released previously before 13-JAN-2014, test_speed_orig_uniform_rec1/5 in tinymt32_tests and tinymt32_nif_tests errorneously called test_speed_orig_uniform_n_rec1/5 (note _n_). This bug would have been affected the evaluation result of the Erlang Workshop 2012 paper. The re-measured loop test execution time of random:uniform_s/1 is approx. 70 to 80 percent of that of random:uniform_s/2. This bug was found with the dialyzer program of R16B03.

  • In versions released previously before 31-MAY-2012 (inclusive), seed0/0 had a wrong value in the #status2 member of the record which exceeded the limit of 2^32. This has been fixed by the corresponding 32-bit value.

On execution speed

  • The HiPE version is about two to three times faster than non-HiPE version, measured in overall execution time, on x86_64/amd64 architectures. (see test-scripts/testspeed.escript) If you need a fast execution, compile with the HiPE option. (see rebar.config)

  • The non-HiPE version is about six times slower than random module on x86_64/amd64, measured by fprof. This is presumably due to increased computational complexity of the algorithm.

Tested platforms

  • OS X 10.12.5 with Erlang/OTP 20.0.1

Make options (of erlang.mk)

  • Makefile works on both BSD/GNU make
  • Makefile.tinymt is the real GNU make file; edit this file for modification
  • Building: make
  • Documentation: make docs
  • Testing: make tests
  • Execution speed benchmark: make speed
  • See also erlang.mk for the details

hex.pm support

  • Package name: tinymt
  • See mix.exs

TODO

  • More documentation and code
  • More evaluation and refactoring

Code authors

  • Kenji Rikitake
  • Mutsuo Saito
  • Makoto Matsumoto

THANKS to

  • Dave "dizzyd" Smith
  • Tuncer Ayaz
  • Ryosuke "Voluntas" Nakai
  • Loïc Hoguin

Acknowledgments

  • Kenji Rikitake used the supercomputer service provided by Academic Center for Computing and Media Studies (ACCMS), Kyoto University, for testing this program and fundamental studies of TinyMT generation parameters.

  • Kenji Rikitake thanks the Program Committee of ACM Erlang Workshop 2012 to give him a chance to present this work as a Practice and Application paper.

More Repositories

1

airspy-fmradion

Software decoder for FM/AM broadcast radio with AirSpy R2 / Mini, Airspy HF+, and RTL-SDR
C++
130
star
2

sfmt-erlang

sfmt-erlang: SIMD-oriented Fast Mersenne Twister (SFMT) for Erlang
Erlang
70
star
3

sshrpc

Erlang SSH RPC module (experimental)
Erlang
39
star
4

erltrek

An Erlang Star Trek game
Erlang
16
star
5

arduino-atmega16u2

Arduino ATmega16U2 USB chip firmware for DFU and USB Serial
C
11
star
6

dbskkd-cdb

SKK dictionary server based on cdb
C
11
star
7

avrhwrng

Hardware Random Number Generator with Arduino
C
10
star
8

macos-audio-streaming-tips

macOS to Linux audio streaming tips including PyAudio, PortAudio, gstreamer, ffmpeg
Python
10
star
9

emprng

Erlang/OTP rand module prototype repository until OTP 20 (for reference use only) - multiple PRNG suite
Erlang
9
star
10

bsdtrek

BSD Star Trek game
C
8
star
11

rtl_power-fm-multipath

FM broadcasting multipath distortion estimation by D/U ratio measurement with rtl_power
Python
8
star
12

exs64

Xorshift64star for Erlang
Erlang
7
star
13

nsplit

Erlang mapping function library splitting a job to n-process concurrent execution
Erlang
7
star
14

v6hex

IPv6 hex address library for Erlang
Erlang
6
star
15

neug

An unofficial clone of FST NeuG
C
6
star
16

WWV

WWV/WWVH emulator. Full format including 100 Hz timecode. Speech by local OS's synthesizer; OSX is best (originally forked from ka9q/WWV, but the original is gone)
C
6
star
17

xorshiftplus-c

Xorshift*/Xorshift+ public domain C code archive
C
6
star
18

ent

ENT - A Pseudorandom Number Sequence Test Program
C
6
star
19

freebsd-dev-trng

An entropy injection device driver for FreeBSD
C
6
star
20

wspr

WSPR for Lubuntu/Ubuntu
Python
6
star
21

plug_static_ls

Serving directory Index for Plug/Phoenix Static Assets
Elixir
5
star
22

ads-b-analysis

dump1090 data analysis scripts in Python and Geographiclib
Python
5
star
23

chopstx

STM32F0 / STM32F103 thread library chopstx: unofficial private clone
C
5
star
24

sd-erlang-public

Software Design誌連載「Erlangで学ぶ並行プログラミング」のサポートページ
Erlang
5
star
25

bearfort

Project Bearfort repository for Erlang Factory SF Bay 2016
C
4
star
26

exsplus128

Xorshift128plus for Erlang
Erlang
4
star
27

xorshiftplus

Archive of Sebastiano Vigna's xorshift+ and xorshift*
C
4
star
28

soxr-code

Sox Resampling Library (forked)
C
4
star
29

infnoise-windows

Infinity Noise TRNG Program for Windows and Visual Studio
C
4
star
30

exs1024

Xorshift1024star for Erlang
Erlang
4
star
31

apresse

APRS software for Erlang and Elixir (for Code BEAM STO 2018)
JavaScript
4
star
32

wspr-cui

WSPR command-line tools
C
4
star
33

sfmt-extstate

SIMD-oriented Fast Mersenne Twister code, rewritten to handle internal state table explicitly
C
4
star
34

dump1090-airspy-experimental

Dump1090 is a Mode S decoder for Software Defined Radio (SDR) devices including RTL-SDR and Airspy.
C
4
star
35

TinyMT

Tiny Mersenne Twister original code with TinyMT-Jump
C++
4
star
36

tinymtdc-longbatch

TinyMT pre-calculated parameter list. See https://zenodo.org/record/5834954 for an alternative archive.
Shell
4
star
37

openbox-clearlooks-solarized

Solarized-colored Clearlooks Theme for Openbox
3
star
38

FourQlib

unofficial clone of Microsoft FourQlib
C
3
star
39

dot-kerlrc

Configuration files for kerl
Shell
3
star
40

sudoku-erlang

Sudoku solver in Erlang
Erlang
3
star
41

infnoise-freebsd

Infinity Noise TRNG Program for FreeBSD
C
3
star
42

avrdice

Arduino Uno R3 C++ code showing random dice number sequence
C++
3
star
43

erlang-freebsd-port

Tentative private FreeBSD Erlang Port for 18.2
Makefile
3
star
44

plug_url_redirector

URL redirector for Plug/Phoenix
Elixir
2
star
45

fraucheky

GNU GPL container for embedded devices
C
2
star
46

cowboy_beam_status

An Erlang Cowboy example program
Erlang
2
star
47

luatrek

Star Trek in Lua
Lua
2
star
48

cmoy-bdx

Chu Moy headphone amplifier schematics and etc.
2
star
49

sphinxconjp2014-examples

LaTeX documentation example for SphinxCon JP 2014
Python
2
star
50

bash-3.2-osx-fix

OS X bash-3.2 fix (with import-functions patch)
C
2
star
51

freebsd-gnu-libiconv-hack

This port is for FreeBSD 10 only. Not applicable for FreeBSD 11. -- GNU libiconv LD_PRELOAD hack for solving possible i18n/m17n problems in FreeBSD 10 and later
Shell
2
star
52

dj1yfk-dxcc

DJ1YFK's DXCC Lookup Utility (forked)
Perl
1
star
53

tqsllib-freebsd-port

FreeBSD port for tqsllib (now WITHOUT GUI tqsl/tqslcert)
C++
1
star
54

indexme

links files into an HTML index for viewing and easy overview
Perl
1
star
55

kichijoji.pm-19

Kichijoji.pm 19 presentation, 2-AUG-2019
XS
1
star
56

efsfbay2015-slides

Erlang Factory SF Bay 2015 slides
1
star
57

infnoise-linux

Infinity Noise TRNG Program for Linux
C
1
star
58

sphinx-latex-table-test

Sphinx LaTeX multirow and multicolumn table creation bug example
TeX
1
star
59

emacs-gift-generic-mode

Emacs Moodle GIFT file format Generic Mode
Emacs Lisp
1
star
60

oueees-201706-public

Slides and figures of my talks on computer networks and information security, at Osaka University, {13, 20, 27} -JUN-2017
1
star
61

euc2016-erlang-prng

Erlang User Conference 2016 presentation source for "Fifteen Ways to Leave Your Random Module"
1
star
62

oueees-201606-public

Slides and figures of my talks on computer networks and information security, at Osaka University, {14, 21, 28} -JUN-2016
1
star
63

writing-otp-modules

Repository for "Writing A New Erlang/OTP Module for Beginners" (Erlang and Elixir Factory SF Bay Area 2017)
HTML
1
star
64

avr_md5

AVR/Arduino ATmega168/328 (Arduino Uno compatible) MD5 optimized assembly implementation
C
1
star
65

ipsj-tokai-20121029-public

Slides and figures of my talk on Erlang/OTP and Information Security, at Nagoya University, 29-OCT-2012
1
star
66

erlang-elixir-color-logo

Erlang and Elixir Color Logo. Licensed CC BY-NC-SA
1
star
67

tew

This archive is no longer maintained - Tokyo Erlang Workshop public repository for Kenji Rikitake
1
star
68

adif_io

ADIF parsing library for Python (forked from Gitlab)
Python
1
star
69

oueees-202106-public

Slides and figures of my talks on computer networks and information security, at Osaka University, June 2021
1
star
70

poudriere_elixir_web

Web server for viewing Poudriere results
Elixir
1
star
71

sd_ep06_eqc

A QuickCheck-CI example for sd-erlang episode 6
Erlang
1
star
72

goadiftools

Go tools for amateur radio ADIF files
Go
1
star
73

gonnet-math-accuracy

Error analysis of system mathematical functions, by Gaston H. Gonnet, ETH, Informatik
C
1
star
74

hamsci-202012-freqdata

HamSCI December 2020 Eclipse Festival of Frequency Measurement result at the radio station JJ1BDX
R
1
star
75

gossn

Solar activity data retriever
Go
1
star
76

ctydat-entitycode

Conversion tables between CTY.DAT Main Prefixes and ARRL DXCC Entity Codes
Raku
1
star