mirror of
https://github.com/lua/lua.git
synced 2025-01-14 05:43:00 +08:00
Roberto Ierusalimschy
51316f9df7
'math.rand()' uses higher bits to produce float value
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.
Description
No description provided
Languages
C
67.4%
Lua
32%
Makefile
0.6%