www.boyet.com
Home
Book's main page

Tomes of Delphi:
Algorithms and Data Structures

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>.





Copyright (c) Julian M Bucknall, 2001 Last modified: 26-Nov-2001. email: Webmaster