Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Electronic Equipment > Digital Signal Processing (DSP) > Re: generate wh...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 11 Topic 14019 of 14332
Post > Topic >>

Re: generate white noise in assembly

by glen herrmannsfeldt <gah@[EMAIL PROTECTED] > Oct 11, 2008 at 07:35 PM

Andor wrote:
(snip)
> In the second edition of NR, they say that all LC PRNG are about
> equally non-random, and the quick and dirty solution above is just as
> good (or bad) as the others. As I wrote, in the current edition (3),
> they discourage the use of LC PRNGs all together.

>>A general Linear congruential RNG has the form  X_{n+1} = (a*X_n + c)
>>mod m.
>>For the ANSI C RNG, m=2^32, a=1103515245, c=12345, and bits 30..16 are
>>returned.

> It makes sense only to return the higher bits. It can be shown that
> each bit in a sequence of LC PRNs has a period of at most 2^(bit
> position+1), eg. the LSB has a period of at most 2. I learned that the
> hard way :-).

This is true if m is a power of two.  I believe it isn't necessarily
true if m is not a power of two.  It is very common, though, for m
to be a power of two.  Otherwise, if I need random low bits I divide
by a prime number sort of near sqrt(m) before using it.

-- glen
 




 11 Posts in Topic:
generate white noise in assembly
"hbarcellos" &l  2008-10-09 04:36:14 
Re: generate white noise in assembly
"mikefromparis"  2008-10-09 12:51:41 
Re: generate white noise in assembly
Jerry Avins <jya@[EMAI  2008-10-09 14:28:41 
Re: generate white noise in assembly
Andor <andor.bariska@[  2008-10-09 11:42:24 
Re: generate white noise in assembly
Jerry Avins <jya@[EMAI  2008-10-09 15:22:51 
Re: generate white noise in assembly
Andor <andor.bariska@[  2008-10-09 12:56:45 
Re: generate white noise in assembly
Jerry Avins <jya@[EMAI  2008-10-09 16:18:46 
Re: generate white noise in assembly
glen herrmannsfeldt <g  2008-10-11 19:35:28 
Re: generate white noise in assembly
Raymond Toy <raymond.t  2008-10-23 17:29:55 
Re: generate white noise in assembly
glen herrmannsfeldt <g  2008-10-23 20:37:56 
Re: generate white noise in assembly
Raymond Toy <raymond.t  2008-10-24 09:08:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 4:38:17 CST 2008.