How does math.random work with exponents work in Lua? -
i trying random 16 digit number in lua. have written isn't working out me when logically should. how math.random work exponents?
this keep getting.
> return math.random(10^15, 10^16) > -1637272360
if want have 16 digit number, try generating them way:
local num = math.random( 10^7, 10^8 ) num = tostring(num)..math.random( 10^7, 10^8 )
and keep variable num
in string type. number, converts values exponential form(because of large; in case > 10^14
; exponential value) or otherwise, can store them a(n) hex string?
Comments
Post a Comment