This shows you the differences between two versions of the page.

factorial [2012/10/04 21:59] 127.0.0.1 external edit |
factorial [2015/02/02 08:28] |
||
---|---|---|---|

Line 1: | Line 1: | ||

- | ====== Factorial ====== | ||

- | ===== Recursive ===== | ||

- | $$ n! = \begin{cases} | ||

- | 1 & \text{if } n = 0, \\ | ||

- | (n-1)!\times n & \text{if } n > 0. | ||

- | \end{cases} | ||

- | $$ | ||

- | [algorithm Factorial (recursive)] | ||

- | |||

- | ===== Iterative ===== | ||

- | $$n!=\prod_{k=1}^n k \!$$ | ||

- | |||

- | [algorithm Factorial (iterative)] |

factorial.txt ยท Last modified: 2015/02/02 08:28 (external edit)