[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
**Subject**: **Re: The probability of returning zero by math.random is doubled.**
**From**: "Javier Guerra" <javier@...>
**Date**: Mon, 22 Sep 2008 10:04:53 -0500

On Mon, Sep 22, 2008 at 9:53 AM, Eero Pajarre <epajarre@gmail.com> wrote:
> On Mon, Sep 22, 2008 at 3:43 PM, Mike Pall <mikelu-0809@mike.de> wrote:
>> Far from it! The 'standard' random number generator in Lua just
>> calls rand() from libc. This means you'll get 100% different
>> results for different platforms or different library versions.
>> It's not thread-safe either. To add insult to injury, on some
>> platforms you'll get 100% weak or non-uniform pseudo-random
>> numbers, too! Are you really, really sure you want that? :-)
>
> Yes!
>
> I DO want that!
I personally don't really care much about RNGs, but I agree the choice
should be orthogonal to the VM choice (plain Lua vs. LuaJIT)
--
Javier

**References**:
**The probability of returning zero by math.random is doubled., ***Atry*
**Re: The probability of returning zero by math.random is doubled., ***Mark Meijer*
**Re: The probability of returning zero by math.random is doubled., ***Mark Meijer*
**Re: The probability of returning zero by math.random is doubled., ***Gé Weijers*
**Re: The probability of returning zero by math.random is doubled., ***Dirk Feytons*
**Re: The probability of returning zero by math.random is doubled., ***Dave Dodge*
**Re: The probability of returning zero by math.random is doubled., ***Mike Pall*
**Re: The probability of returning zero by math.random is doubled., ***Eero Pajarre*
**Re: The probability of returning zero by math.random is doubled., ***Mike Pall*
**Re: The probability of returning zero by math.random is doubled., ***Eero Pajarre*