|
Brighton Webs Ltd.
Statistics for Energy and the Environment
|
|
Factorial The factorial of an integer is defined as: The factorial of a number is shown as n!. For calculating the factorial of large numbers, it can be advantageous to use the gamma function, for integer values of n, the relationship between the factorial and gamma function is: The factorial of zero is one. Example The factorial of six is calculated: Pseudo Code The VB style pseudo code below uses the multiplicative method to calculate the factorial of an integer in the range 0 to 128. Repetitive multiplication will ultimately lead to overflow, hence the limitation. The appropriate value of N_Max, will depend on the language and the precision used.
|
|
| Page updated: 02-Feb-2006 | |