Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Details | Roberto Ierusalimschy | 2025-01-16 | 1 | -1/+1 |
| | | | | New year (2024->2025), typos in comments | ||||
* | Added gcc option '-Wconversion' | Roberto Ierusalimschy | 2024-07-27 | 1 | -6/+6 |
| | | | | | No warnings for standard numerical types. Still pending alternative numerical types. | ||||
* | llimits.h being used by all Lua code | Roberto Ierusalimschy | 2024-06-20 | 1 | -14/+7 |
| | | | | | | The definitions in llimits.h are useful not only for the core. That header only defines types and '#define's, so libs and core still do not share any real code/data. | ||||
* | Fixed warnings from different compilers | Roberto Ierusalimschy | 2024-02-15 | 1 | -1/+1 |
| | |||||
* | Merge branch 'master' into nextversion | Roberto Ierusalimschy | 2023-11-07 | 1 | -7/+24 |
|\ | |||||
| * | Avoid casts from unsigned long to floating-point | Roberto Ierusalimschy | 2023-09-08 | 1 | -7/+24 |
| | | | | | | | | Old Microsoft compilers do not support those casts. | ||||
* | | Clock component removed from 'luaL_makeseed' | Roberto Ierusalimschy | 2023-03-23 | 1 | -2/+2 |
| | | | | | | | | 'clock' can be quite slow on some machines. | ||||
* | | New function 'luaL_makeseed' | Roberto Ierusalimschy | 2023-03-20 | 1 | -17/+7 |
|/ | | | | | | This function unifies code from 'lua_newstate', 'math.randomseed', and 'table.sort' that tries to create a value with a minimum level of randomness. | ||||
* | Details | Roberto Ierusalimschy | 2022-12-02 | 1 | -5/+5 |
| | | | | Parentheses and comments. | ||||
* | Detail | Roberto Ierusalimschy | 2022-01-03 | 1 | -2/+2 |
| | | | | Warnings with clang when using long double for Lua floats. | ||||
* | Broadening the use of branch hints | Roberto Ierusalimschy | 2021-02-24 | 1 | -2/+3 |
| | | | | | | More uses of macros 'likely'/'unlikely' (renamed to 'l_likely'/'l_unlikely'), both in range (extended to the libraries) and in scope (extended to hooks, stack growth). | ||||
* | Several details about 5.4.0 rc1 | Roberto Ierusalimschy | 2020-04-23 | 1 | -1/+1 |
| | | | | | Corrected several small details: added 'const', adjusts in tabs x spaces, removed unused #includes and #defines, misspellings, etc. | ||||
* | Details | Roberto Ierusalimschy | 2020-02-27 | 1 | -13/+15 |
| | | | | | Several details in code (e.g., moving a variable to the most inner scope that encloses its uses), comments, parameter names, extra tests. | ||||
* | 'l_mathlim' renamed to 'l_floatatt' | Roberto Ierusalimschy | 2019-12-05 | 1 | -1/+1 |
| | | | | That macro is applied to float attributes, not to limits. | ||||
* | Added macro 'luaL_pushfail' | Roberto Ierusalimschy | 2019-08-16 | 1 | -2/+2 |
| | | | | | | | | The macro 'luaL_pushfail' documents all places in the standard libraries that return nil to signal some kind of failure. It is defined as 'lua_pushnil'. The manual also got a notation (@fail) to document those returns. The tests were changed to be agnostic regarding whether 'fail' is 'nil' or 'false'. | ||||
* | 'math.randomseed' always returns the two seed components | Roberto Ierusalimschy | 2019-07-19 | 1 | -7/+7 |
| | |||||
* | 'math.randomseed()' returns the seeds it used | Roberto Ierusalimschy | 2019-07-17 | 1 | -2/+7 |
| | | | | | A call to 'math.randomseed()' returns the two components of the seed it set, so that they can be used to set that same seed again. | ||||
* | Define LUA_MAXUNSIGNED as a preprocessor constant | Roberto Ierusalimschy | 2019-05-14 | 1 | -2/+2 |
| | | | | | The previous definition of LUA_MAXUNSIGNED used a typecast, making it unsuitable for constant expressions in the preprocessor. | ||||
* | A few changes in tests about number of bits in integers | Roberto Ierusalimschy | 2019-05-13 | 1 | -4/+4 |
| | | | | | | - The preprocessor must work with at least 'long', and therefore must do shifts of up to 31 bits correctly. - Whenever possible, use unsigned types in shifts. | ||||
* | 'math.randomseed()' sets a somewhat random seed | Roberto Ierusalimschy | 2019-03-13 | 1 | -10/+21 |
| | | | | | | When called with no arguments, 'math.randomseed' uses time and ASLR to generate a somewhat random seed. the initial seed when Lua starts is generated this way. | ||||
* | 'math.rand()' uses higher bits to produce float value | Roberto Ierusalimschy | 2018-12-11 | 1 | -20/+38 |
| | | | | | | | The call 'math.rand()' converts the higher bits of the internal unsigned integer random to a float, instead of its lower bits. That ensures that Lua compiled with different float precisions always generates equal (up to the available precision) random numbers when given the same seed. | ||||
* | Removed extra information from RCS keyword strings | Roberto Ierusalimschy | 2018-08-23 | 1 | -1/+1 |
| | | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept. | ||||
* | type 'Rand64' may not be long long, so it should not use 'LL' in its | Roberto Ierusalimschy | 2018-06-14 | 1 | -4/+5 |
| | | | | constants | ||||
* | using some weak "randomness" (time and memory address) to initialize | Roberto Ierusalimschy | 2018-05-16 | 1 | -10/+21 |
| | | | | seeds for the PRNG | ||||
* | correction on xoshiro256** algorithm | Roberto Ierusalimschy | 2018-05-09 | 1 | -3/+3 |
| | | | | (should use state[1] instead of state[0] for output) | ||||
* | reorganization of '#if's for sellecting a type for 'Rand64' + | Roberto Ierusalimschy | 2018-05-04 | 1 | -31/+56 |
| | | | | comments | ||||
* | detail (trim constants are unsigned) | Roberto Ierusalimschy | 2018-04-06 | 1 | -3/+3 |
| | |||||
* | PRNG changed from 'xoroshiro128+' to 'xoshiro256**' + "I' renamed 'Rand64' | Roberto Ierusalimschy | 2018-04-06 | 1 | -73/+109 |
| | | | | + implementation can use integer types larger than 64 (or 32) bits | ||||
* | using 'xoroshiro128+' for PRNG | Roberto Ierusalimschy | 2018-04-04 | 1 | -87/+88 |
| | | | | (plus a rotate at the final result to have better lower bits) | ||||
* | in 'random', uses high-order bits instead of low-order | Roberto Ierusalimschy | 2018-03-26 | 1 | -49/+68 |
| | | | | (better statistical properties) | ||||
* | in random/'project', remove the special case for "small" intervals; | Roberto Ierusalimschy | 2018-03-22 | 1 | -24/+15 |
| | | | | it is slower than the general case. | ||||
* | avoid functions named 'pack' | Roberto Ierusalimschy | 2018-03-16 | 1 | -7/+7 |
| | | | | (name too common, may collide when doing 'onelua.c') | ||||
* | 'lu_int32' may not be 'int' | Roberto Ierusalimschy | 2018-03-12 | 1 | -10/+13 |
| | |||||
* | more explicit casts when converting an integer to a random float | Roberto Ierusalimschy | 2018-03-11 | 1 | -3/+5 |
| | | | | (to ensure computations are done with all bits) | ||||
* | random floats of different sizes get exactly needed number of random bits | Roberto Ierusalimschy | 2018-03-09 | 1 | -30/+58 |
| | | | | (up to 64) | ||||
* | slight simplification in 'xorshift128plus' | Roberto Ierusalimschy | 2018-03-09 | 1 | -9/+11 |
| | |||||
* | fairer projection of random integers into an integer interval | Roberto Ierusalimschy | 2018-03-09 | 1 | -15/+54 |
| | |||||
* | 'math.random' using the xorshift128+ algorithm | Roberto Ierusalimschy | 2018-03-05 | 1 | -36/+195 |
| | |||||
* | detail (removing spaces at end of lines) | Roberto Ierusalimschy | 2016-12-22 | 1 | -4/+4 |
| | |||||
* | Using LUAI_UAC* types more consistently on vararg calls | Roberto Ierusalimschy | 2016-12-20 | 1 | -4/+7 |
| | |||||
* | detail (ensure subtraction is done unsigned) | Roberto Ierusalimschy | 2015-10-02 | 1 | -2/+2 |
| | |||||
* | tiny bug: 'randomseed' was calling 'rand' (instead of 'l_rand') | Roberto Ierusalimschy | 2015-06-26 | 1 | -2/+2 |
| | | | | to discard first value | ||||
* | use 'log2' when available | Roberto Ierusalimschy | 2015-03-12 | 1 | -1/+4 |
| | |||||
* | bug: 'random' limit is 2^31-1, not RAND_MAX | Roberto Ierusalimschy | 2014-12-27 | 1 | -3/+5 |
| | |||||
* | cleaner test for overflow for range of 'math.random' | Roberto Ierusalimschy | 2014-11-07 | 1 | -3/+3 |
| | |||||
* | added include for 'lprefix.h', for stuff that must be added before | Roberto Ierusalimschy | 2014-11-02 | 1 | -4/+6 |
| | | | | any other header file | ||||
* | 'lua_numtointeger' -> 'lua_numbertointeger' | Roberto Ierusalimschy | 2014-10-24 | 1 | -2/+2 |
| | |||||
* | added some casts for the cases when lua_Number != double | Roberto Ierusalimschy | 2014-10-08 | 1 | -6/+6 |
| | |||||
* | deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.) | Roberto Ierusalimschy | 2014-10-01 | 1 | -2/+2 |
| | |||||
* | new function 'math.ult' (unsigned less than) | Roberto Ierusalimschy | 2014-07-28 | 1 | -1/+10 |
| |