Roberto Ierusalimschy
|
347d6961ac
Define LUA_MAXUNSIGNED as a preprocessor constant
|
vor 6 Jahren |
Roberto Ierusalimschy
|
279c3a6961
A few changes in tests about number of bits in integers
|
vor 6 Jahren |
Roberto Ierusalimschy
|
9eca305e75
'math.randomseed()' sets a somewhat random seed
|
vor 6 Jahren |
Roberto Ierusalimschy
|
51316f9df7
'math.rand()' uses higher bits to produce float value
|
vor 6 Jahren |
Roberto Ierusalimschy
|
f99509581e
Removed extra information from RCS keyword strings
|
vor 7 Jahren |
Roberto Ierusalimschy
|
aedcfb9414
type 'Rand64' may not be long long, so it should not use 'LL' in its
|
vor 7 Jahren |
Roberto Ierusalimschy
|
de53c2ec7e
using some weak "randomness" (time and memory address) to initialize
|
vor 7 Jahren |
Roberto Ierusalimschy
|
80bd4a8940
correction on xoshiro256** algorithm
|
vor 7 Jahren |
Roberto Ierusalimschy
|
3e7415e846
reorganization of '#if's for sellecting a type for 'Rand64' +
|
vor 7 Jahren |
Roberto Ierusalimschy
|
762baf0548
detail (trim constants are unsigned)
|
vor 7 Jahren |
Roberto Ierusalimschy
|
b8a04658b2
PRNG changed from 'xoroshiro128+' to 'xoshiro256**' + "I' renamed 'Rand64'
|
vor 7 Jahren |
Roberto Ierusalimschy
|
b44787652b
using 'xoroshiro128+' for PRNG
|
vor 7 Jahren |
Roberto Ierusalimschy
|
bdd10a08b1
in 'random', uses high-order bits instead of low-order
|
vor 7 Jahren |
Roberto Ierusalimschy
|
c5e3b2f814
in random/'project', remove the special case for "small" intervals;
|
vor 7 Jahren |
Roberto Ierusalimschy
|
89da4168df
avoid functions named 'pack'
|
vor 7 Jahren |
Roberto Ierusalimschy
|
6b01b6cf6a
'lu_int32' may not be 'int'
|
vor 7 Jahren |
Roberto Ierusalimschy
|
e3388ebfad
more explicit casts when converting an integer to a random float
|
vor 7 Jahren |
Roberto Ierusalimschy
|
dbec41f34c
random floats of different sizes get exactly needed number of random bits
|
vor 7 Jahren |
Roberto Ierusalimschy
|
0b3db69e41
slight simplification in 'xorshift128plus'
|
vor 7 Jahren |
Roberto Ierusalimschy
|
80ae1c1c16
fairer projection of random integers into an integer interval
|
vor 7 Jahren |
Roberto Ierusalimschy
|
66b7b075a6
'math.random' using the xorshift128+ algorithm
|
vor 7 Jahren |
Roberto Ierusalimschy
|
2a235312f0
detail (removing spaces at end of lines)
|
vor 8 Jahren |
Roberto Ierusalimschy
|
9903dd52a3
Using LUAI_UAC* types more consistently on vararg calls
|
vor 8 Jahren |
Roberto Ierusalimschy
|
dc4232379d
detail (ensure subtraction is done unsigned)
|
vor 9 Jahren |
Roberto Ierusalimschy
|
be63d995c1
tiny bug: 'randomseed' was calling 'rand' (instead of 'l_rand')
|
vor 10 Jahren |
Roberto Ierusalimschy
|
7d930ec694
use 'log2' when available
|
vor 10 Jahren |
Roberto Ierusalimschy
|
1a7868c1d5
bug: 'random' limit is 2^31-1, not RAND_MAX
|
vor 10 Jahren |
Roberto Ierusalimschy
|
17ca3b1763
cleaner test for overflow for range of 'math.random'
|
vor 10 Jahren |
Roberto Ierusalimschy
|
28fdbcf393
added include for 'lprefix.h', for stuff that must be added before
|
vor 10 Jahren |
Roberto Ierusalimschy
|
463edee2fd
'lua_numtointeger' -> 'lua_numbertointeger'
|
vor 10 Jahren |