After speaking to the authors, the attribution comment is not required for this instance. However, Numerical Recipes in C is an awesome book written by some very smart and classy folks. It's a great book.
Commit migrated from https://github.com/dotnet/coreclr/commit/
086b32fbef099b8be50683ea942ee09fd8021866
//
// Defines a random number generator, ripped off from the System.Random code in the BCL. If you notice any problems,
-// please compare to the implementation in ndp\clr\src\bcl\system\random.cs.
+// please compare to the implementation in src\mscorlib\src\system\random.cs.
//
// Main advantages over rand() are:
//
int mj, mk;
//Initialize our Seed array.
- //This algorithm comes from Numerical Recipes in C (2nd Ed.)
mj = MSEED - abs(Seed);
SeedArray[55]=mj;
mk=1;
int mj, mk;
//Initialize our Seed array.
- //This algorithm comes from Numerical Recipes in C (2nd Ed.)
int subtraction = (Seed == Int32.MinValue) ? Int32.MaxValue : Math.Abs(Seed);
mj = MSEED - subtraction;
SeedArray[55]=mj;