Re: simple way to generate random numbers in c without using library function.
- From: Jens Schmidt <Jens.Schmidt-HH@xxxxxx>
- Date: Tue, 15 Sep 2009 16:55:42 -0500 (CDT)
Golden California Girls wrote:
Jasen Betts wrote:not.
the rate is predictable, the timing of the individual nuclear events are
Yes, individual events are predictable in that they can be influenced.
That is one of the surprises in physics.
Do you have any numbers how big this effect may be, especially in comparison
to the stability of the timing in the measurement equipment?
However the rate of decay is so stable that it is uniform and not random
over a given period. In other words you will get decay counts almost
identical every time you look at the sample. That is why only the least
significant digit might be random. And you need to test that before you
rely on it.
Measuring the rate of decay is a big error. Physics tell us this will
deliver an averaged value, so almost all randomness is removed. Measure
the time between two events instead.
The decay rate itself, for some kinds of decay, has a periodicity of the
earth's orbit around the sun, this due to flavor switching of solar
neutrinos, never mind the half rate decay. Another recent surprise to
physics.
Again, is the decay rate varying enough to be measureable with any
equipment that has a reasonable price tag? And the half rate decay is
well known and can be corrected with a little calculation.
BTW, the dead time (no sensor can separate two events very short after
another) is probably a more relevant problem. But also this can be
corrected.
But just looking at it another way, if your time slice is very tiny, you
will get piles of zero counts, obviously not random. If your slice is big
you get lots of huge counts, but never a zero so obviously not random. All
you can do is use the low order bits, but is the decay rate so stable that
you get the same or a very close count frequently? Unfortunately the
answer is yes. Otherwise you couldn't state its half life.
Again, measure interval times, not counts.
Interval times are normal-distributed, this can be calculated back to
an even distribution if needed.
Side remark: we are currently leaving contact both with the C language
and the thread theme "simple way". So either let's end this or continue
somewhere more appropriate.
--
Greetings,
Jens Schmidt
--
comp.lang.c.moderated - moderation address: clcm@xxxxxxxxxxxx -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line. Sorry.
.
- Follow-Ups:
- Re: simple way to generate random numbers in c without using library function.
- From: Golden California Girls
- Re: simple way to generate random numbers in c without using library function.
- References:
- Re:simple way to generate random numbers in c without using library function.
- From: sandeep.panchamukhi@xxxxxxxxx
- Re: simple way to generate random numbers in c without using library function.
- From: Gordon Burditt
- Re: simple way to generate random numbers in c without using library function.
- From: Golden California Girls
- Re: simple way to generate random numbers in c without using library function.
- From: Jasen Betts
- Re: simple way to generate random numbers in c without using library function.
- From: Golden California Girls
- Re:simple way to generate random numbers in c without using library function.
- Prev by Date: Re: defining macro template
- Next by Date: Re: simple way to generate random numbers in c without using library function.
- Previous by thread: Re: simple way to generate random numbers in c without using library function.
- Next by thread: Re: simple way to generate random numbers in c without using library function.
- Index(es):
Relevant Pages
|