www.boyet.com | |||||||
|
Tomes of Delphi: This page describes the errata for Chapter 6 of Tomes of Delphi: Algorithms and Data Structures (DADS). Errata for Chapter 6: Randomized Algorithms 1. Page 208, Listing 6.12. The code for NormalRandomNumber forgets to apply the mean and standard deviation. There should be an extra line at the end of the routine to modify the resulting random number: ... begin if NRGNextIsSet then begin ... end else begin ... end; Result := (Result * aStdDev) + aMean; end; Thanks to myself <g>. |