lua-users home
lua-l archive

Re: Replacing rand()

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Brian Hook wrote:
Do you know of any comprehensive analysis of your FNV-1a implementation against standards for randomness?
Nope...
> MT isn't
cryptographically secure (natively) either, but if FNV-1a is better than rand() (which shouldn't be that difficult given how bad rand() is),
I can't really say whether fnvrand is better than rand(), because
rand() varies from system to system (glibc's is pretty good in
most regards apart from speed, I understand). I somewhat doubt that
it's as 'random' as MT, but I'm always ready to be surprised.
> (and assuming the license is compatible).
If it's not then I chose the wrong license.
--Adam
--
Adam D. Moss . ,,^^ adam@gimp.org http://www.foxbox.org/ co:3

AltStyle によって変換されたページ (->オリジナル) /