lights FAQ Forum github.com/luapower/terra.random
This package
terra.random

Terra Standard Libraries
terra.low
terra.arrayview
terra.dynarray
terra.hashmap
terra.phf
terra.linkedlist
terra.fixedfreelist
terra.arrayfreelist
terra.lrucache
terra.bitarray
terra.utf8
terra.random

terra.random

Tausworthe PRNG in Terra


--[[

	Tausworthe PRNG in Terra.
	Written by Cosmin Apreutesei. Public Domain.
	Translated from LuaJIT's lib_math.c Copyright (C) 2005-2017 Mike Pall.

	TODO: how to use thread-load vars in Terra for the global RandomState?

	This implements a Tausworthe PRNG with period 2^223. Based on:
		Tables of maximally-equidistributed combined LFSR generators,
		Pierre L'Ecuyer, 1991, table 3, 1st entry.
	Full-period ME-CF generator with L=64, J=4, k=223, N1=49.

]]

See the source code for more info.


Package:terra.random
Pkg type:Terra
Version: 239b4fe
Last commit:
Author: Cosmin Apreutesei
License: Public Domain
Requires: +terra.low  +glue  +luajit  +pp 
Required by: none

Top