Definitions

   The factorial of   0   (zero)   is defined as being   1   (unity).
   The   Factorial Function   of a positive integer,    n,    is defined as the product of the sequence:
                 n,   n-1,   n-2,   ...   1 



Task

Write a function to return the factorial of a number.

Solutions can be iterative or recursive.

Support for trapping negative    n    errors is optional.



Related task

   Primorial numbers


11100000000000100000000000000000   0. -7 to c
10101000000000010000000000000000   1. Sub. 21
10100000000001100000000000000000   2. c to 5
10100000000000100000000000000000   3. -5 to c
10100000000001100000000000000000   4. c to 5
00000000000000000000000000000000   5. generated at run time
00000000000001110000000000000000   6. Stop
00010000000000100000000000000000   7. -8 to c
11111111111111111111111111111111   8. -1
11111111111111111111111111111111   9. -1
01111111111111111111111111111111  10. -2
01011111111111111111111111111111  11. -6
00010111111111111111111111111111  12. -24
00010001111111111111111111111111  13. -120
00001100101111111111111111111111  14. -720
00001010001101111111111111111111  15. -5040
00000001010001101111111111111111  16. -40320
00000001011011100101111111111111  17. -362880
00000000100001010001001111111111  18. -3628800
00000000110101110111100110111111  19. -39916800
00000000001000001100111011000111  20. -479001600
01010000000000000000000000000000  21. 10