/*********************************************************************

DPUSER function FACTORIAL:
compute the factorial of an integer number

function arguments:
- N:	number for which the factorial is computed (N <= 170)

function output:
factorial of "N"


example:

DPUSER> print factorial(23)
2.5852e+22

**********************************************************************/


function factorial, N {
  
  if (N > 170) print "WARNING - This will be inf"
  
  product = 1.
  
  for i = 1, N {
  
    product *= i
  
  }
  
  factorial = product

}

