I have two questions regarding implementation of Random class in .NET Framework 4.6 (code available here):
-
What is the rationale for setting
Seedargument to1at the end of the constructor? It seems to be copy-pasted fromNumerical Recipes in C (2nd Ed.)where it made some sense, but it doesn't have any in C#. -
It is directly stated in the book (
Numerical Recipes in C (2nd Ed.)) thatinextpfield is set to value31because: "The constant 31 is special; see Knuth". However, in the .NET implementation this field is set to value21. Why? The rest of a code seems to closely follow the code from book except for this detail.
Aucun commentaire:
Enregistrer un commentaire