R
rossum
I am looking for a source for the internal details of the
System.Random pseudo random number generator. Something reasonably
technical please, not how to use it (which I know) but more how does
it work under the hood.
Failing that I have three specific questions:
1 Is the core PRNG using integer arithmetic or floating point
arithmetic? The presence of Sample() makes me suspect that it is
floating point.
2 Is the protected method Sample() faster, slower or about the same as
the public method NextDouble()?
3 Is there anything special about Sample() compared to the way
NextDouble() operates?
For amusement I am building a PRNG class derived from System.Random so
it is useful to know a bit of detail about the internals of the base
class so I can make the best use of it.
Thanks in advance,
rossum
System.Random pseudo random number generator. Something reasonably
technical please, not how to use it (which I know) but more how does
it work under the hood.
Failing that I have three specific questions:
1 Is the core PRNG using integer arithmetic or floating point
arithmetic? The presence of Sample() makes me suspect that it is
floating point.
2 Is the protected method Sample() faster, slower or about the same as
the public method NextDouble()?
3 Is there anything special about Sample() compared to the way
NextDouble() operates?
For amusement I am building a PRNG class derived from System.Random so
it is useful to know a bit of detail about the internals of the base
class so I can make the best use of it.
Thanks in advance,
rossum