Computing the factorial of a number.
Written by Luca Bonacorsi   
09 September 2008

The factorial of a number is an important mathematical concept.
The computation of permutations and combinations, just to mention a few examples, is based on it.

The factorial of a number is recognizable by an exclamation mark.
For instance 5! is 5 factorial.

What does the exclamation mark mean?

Simply put 5! means to compute this kind of calculation: 5*4*3*2*1.

Generally speaking n! means to compute n*(n-1)*(n-2)*...*2*1.
By definition 0! is 1.

All registered users can download (in the proper section in the "download" area) an algorithm i implemented in ActionScript 3.0 which calculates the factorial of a number.

Commenti (0)
Solo gli utenti registrati possono scrivere commenti!