On Fri, Mar 4, 2011 at 5:59 PM, Simon Slavin <slav...@bigfraud.org> wrote:

>
> On 4 Mar 2011, at 9:55pm, Black, Michael (IS) wrote:
>
> > SQlite's random() is a pseudo-random (as are most all) so there is no
> collision until you get the same value back at which point it just repeats
> the whole sequence again.
>
> Are you sure about that ?  It's very difficult to generate sequences which
> do that and still look random, and it wouldn't happen by accident.
>

SQLite use RC4 as its PRNG.  While RC4 is frowned up on for encryption these
days, it still makes a pretty good PRNG.  Unlike LCG and LFSR PRNGs, the
output sequence does not loop the first time you get a repeated output
value.



>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to