Which Bits to Use From a Linear Congruential Pseudo-Random Number Generator?
- From: "David T. Ashley" <dta@xxxxxxxx>
- Date: Wed, 24 Sep 2008 19:05:38 -0400
Hi,
I'm developing a small embedded system and plan to implement an LCG as
described here:
http://en.wikipedia.org/wiki/Linear_congruential_generator
The function I have in mind is
X(n+1) = (1664525 * X(n) + 1013904223) mod 2**32
which naturally lends itself to a 32-bit seed.
The random number function will only return 16 bits of the 32-bit seed ...
the question is which 16 bits to choose?
The web page hints that the least significant bits will have a shorter
period than 2**32 ... should I choose bits above those ... but how should I
decide which ones?
Thanks.
.
Relevant Pages
- Re: Gas prices rises 10 cents a gallon over 2 weeks
... weather me through the Blumph! ... That's a plan. ... I keep in mind that in many transactions, ... (misc.survivalism) - Re: Any advice on planning?
... Though perhaps the fact that you're conscious of this "plan" is a little unusual. ... I have a strong mind. ... I'm almost never a "burst" writer, not even on a smallish scale, and trying to make myself be one generally has...less than stellar results. ... problem is, every writer has a different process that works best for *them*, and if you don't *know* that somebody works the way you do, you can wreck their writing prospects most thoroughly by advising too strongly that *your* way is the best, most effective, or fastest way to get a story written. ... (rec.arts.sf.composition) - Re: looking for samplers
... Also a plan similar to many. ... you quite a bit of discussion on homebuilt cabinets, ... "Be who you are and say what you feel, because those who mind don't matter, ... (alt.smokers.cigars) - Re: !!!!!!!!!!! Do NOT Stay at Wynn Resort for Special Occasion - Completely Disappointed -
... Who in their right mind does not discuss suppositions with the very people ... You are an idiot that does not plan well, ... Completely Disappointed - WARNING WARNING ... Don't plan on being treated special for a special occasion - YOU HAVE ... (alt.vacation.las-vegas) - Re: Superb Operation by the Police
... there are many examples of torture achieving something useful. ... AQ plan ... >to down 11 747's over the Pacific springs immediately to mind. ... >The liberal policies you espouse have been tried, ... (uk.legal) |
|